From fca1fed7bb73c53e5c48e33b7ebb42f3653c2bbe Mon Sep 17 00:00:00 2001 From: xenohedron <12538125+xenohedron@users.noreply.github.com> Date: Mon, 26 May 2025 00:14:23 -0400 Subject: [PATCH] fix #13657 (Gorex, the Tombshell) --- Mage.Sets/src/mage/cards/g/GorexTheTombshell.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Mage.Sets/src/mage/cards/g/GorexTheTombshell.java b/Mage.Sets/src/mage/cards/g/GorexTheTombshell.java index 09770ddd69c..691fac1f249 100644 --- a/Mage.Sets/src/mage/cards/g/GorexTheTombshell.java +++ b/Mage.Sets/src/mage/cards/g/GorexTheTombshell.java @@ -128,11 +128,22 @@ class GorexTheTombshellReturnEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + // exile zone corresponds to object on stack + // relative zcc depends on object zone (battlefield for attacks trigger, graveyard for dies) + // so try both zcc offsets to find zone ExileZone exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId( game, source.getSourceId(), source.getSourceObjectZoneChangeCounter() - 1 )); - if (player == null || exileZone == null || exileZone.isEmpty()) { - return false; + if (exileZone == null || exileZone.isEmpty()) { + exileZone = game.getExile().getExileZone(CardUtil.getExileZoneId( + game, source.getSourceId(), source.getSourceObjectZoneChangeCounter() - 2 + )); + if (exileZone == null || exileZone.isEmpty()) { + return false; + } } return player.moveCards(exileZone.getRandom(game), Zone.HAND, source, game); }