This commit is contained in:
Jeff 2019-03-28 17:34:51 -05:00
parent 7c8ba650a2
commit b10b973d09

View file

@ -86,15 +86,14 @@ class MesmericFiendExileEffect extends OneShotEffect {
Card card = opponent.getHand().get(target.getFirstTarget(), game); Card card = opponent.getHand().get(target.getFirstTarget(), game);
if (card != null) { if (card != null) {
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter()); UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter());
game.getState().setValue(source.getSourceId().toString() + source.getSourceObjectZoneChangeCounter(), exileId);
controller.moveCardsToExile(card, source, game, true, exileId, sourcePermanent.getName()); controller.moveCardsToExile(card, source, game, true, exileId, sourcePermanent.getName());
} }
} }
return true; return true;
} }
return false; return false;
} }
} }
class MesmericFiendLeaveEffect extends OneShotEffect { class MesmericFiendLeaveEffect extends OneShotEffect {
@ -119,7 +118,8 @@ class MesmericFiendLeaveEffect extends OneShotEffect {
MageObject sourceObject = source.getSourceObject(game); MageObject sourceObject = source.getSourceObject(game);
if (controller != null if (controller != null
&& sourceObject != null) { && sourceObject != null) {
UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), source.getSourceObjectZoneChangeCounter() - 1); int zoneChangeMinusOne = source.getSourceObjectZoneChangeCounter() - 1;
UUID exileId = (UUID) game.getState().getValue(source.getSourceId().toString() + zoneChangeMinusOne);
if (exileId != null) { if (exileId != null) {
Cards cards = game.getExile().getExileZone(exileId); Cards cards = game.getExile().getExileZone(exileId);
if (!cards.isEmpty()) { if (!cards.isEmpty()) {