- Fixed #8344. Works when blinked as well.

This commit is contained in:
Jeff Wadsworth 2021-10-01 17:03:54 -05:00
parent c45f8c91a3
commit 16d20e73d2

View file

@ -84,9 +84,12 @@ class GisaGloriousResurrectorExileEffect extends ReplacementEffectImpl {
if (zEvent.getTarget() instanceof PermanentToken) { if (zEvent.getTarget() instanceof PermanentToken) {
return player.moveCards(zEvent.getTarget(), Zone.EXILED, source, game); return player.moveCards(zEvent.getTarget(), Zone.EXILED, source, game);
} }
game.getState().setValue("GisaGloriousResurrectorExile"
+ source.getSourceId().toString()
+ game.getState().getZoneChangeCounter(source.getSourceId()), source);
return player.moveCardsToExile( return player.moveCardsToExile(
zEvent.getTarget(), source, game, false, zEvent.getTarget(), source, game, false,
CardUtil.getExileZoneId(game, source), null CardUtil.getExileZoneId(game, source), "Gisa, Glorious Resurrector"
); );
} }
@ -109,8 +112,8 @@ class GisaGloriousResurrectorReturnEffect extends OneShotEffect {
GisaGloriousResurrectorReturnEffect() { GisaGloriousResurrectorReturnEffect() {
super(Outcome.Benefit); super(Outcome.Benefit);
staticText = "put all creature cards exiled with {this} " + staticText = "put all creature cards exiled with {this} "
"onto the battlefield under your control. They gain decayed"; + "onto the battlefield under your control. They gain decayed";
} }
private GisaGloriousResurrectorReturnEffect(final GisaGloriousResurrectorReturnEffect effect) { private GisaGloriousResurrectorReturnEffect(final GisaGloriousResurrectorReturnEffect effect) {
@ -125,8 +128,16 @@ class GisaGloriousResurrectorReturnEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId()); Player player = game.getPlayer(source.getControllerId());
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, source)); Ability exiledWithSource = (Ability) game.getState().getValue("GisaGloriousResurrectorExile"
if (player == null || exileZone == null || exileZone.isEmpty()) { + source.getSourceId().toString()
+ game.getState().getZoneChangeCounter(source.getSourceId()));
if (exiledWithSource == null) {
return false;
}
ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId(game, exiledWithSource));
if (player == null
|| exileZone == null
|| exileZone.isEmpty()) {
return false; return false;
} }
Cards cards = new CardsImpl(exileZone.getCards(StaticFilters.FILTER_CARD_CREATURE, game)); Cards cards = new CardsImpl(exileZone.getCards(StaticFilters.FILTER_CARD_CREATURE, game));