mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[DGM] fixed Legion's Initiative not returning exiled creatures (fixes #8761)
This commit is contained in:
parent
7f4e691685
commit
a5e21b8c9e
2 changed files with 7 additions and 3 deletions
|
@ -64,7 +64,7 @@ public final class LegionsInitiative extends CardImpl {
|
|||
)));
|
||||
|
||||
// {R}{W}, Exile Legion's Initiative: Exile all creatures you control. At the beginning of the next combat, return those cards to the battlefield under their owner's control and those creatures gain haste until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(new LegionsInitiativeExileEffect(), new ManaCostsImpl("{R}{W}"));
|
||||
Ability ability = new SimpleActivatedAbility(new LegionsInitiativeExileEffect(), new ManaCostsImpl<>("{R}{W}"));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(
|
||||
new AtTheBeginOfCombatDelayedTriggeredAbility(new LegionsInitiativeReturnFromExileEffect())
|
||||
));
|
||||
|
@ -136,7 +136,7 @@ class LegionsInitiativeReturnFromExileEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source));
|
||||
ExileZone exile = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source, -1));
|
||||
if (player == null || exile == null || exile.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -597,7 +597,11 @@ public final class CardUtil {
|
|||
}
|
||||
|
||||
public static UUID getExileZoneId(Game game, Ability source) {
|
||||
return getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
|
||||
return getExileZoneId(game, source, 0);
|
||||
}
|
||||
|
||||
public static UUID getExileZoneId(Game game, Ability source, int offset) {
|
||||
return getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter() + offset);
|
||||
}
|
||||
|
||||
public static UUID getExileZoneId(Game game, UUID objectId, int zoneChangeCounter) {
|
||||
|
|
Loading…
Reference in a new issue