From 8a9d85abfc9c19abddb79389bb60e017d6df9b9c Mon Sep 17 00:00:00 2001 From: Hanmac Date: Tue, 28 Jun 2016 11:06:43 +0000 Subject: [PATCH] SetStateEffect: TurnFace should be allowed in other zones to allow to turn them up in exile --- .../java/forge/game/ability/effects/SetStateEffect.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java b/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java index 3bab0936ae1..3d143741f25 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/SetStateEffect.java @@ -39,6 +39,7 @@ public class SetStateEffect extends SpellAbilityEffect { @Override public void resolve(final SpellAbility sa) { + final String mode = sa.getParam("Mode"); final Card host = sa.getHostCard(); final Game game = host.getGame(); final List tgtCards = getTargetCards(sa); @@ -51,11 +52,12 @@ public class SetStateEffect extends SpellAbilityEffect { } // Cards which are not on the battlefield should not be able to transform. - if (!tgt.isInZone(ZoneType.Battlefield)) { + // TurnFace should be allowed in other zones like Exil too + if (!"TurnFace".equals(mode) && !tgt.isInZone(ZoneType.Battlefield)) { continue; } - if ("Transform".equals(sa.getParam("Mode")) && tgt.equals(host)) { + if ("Transform".equals(mode) && tgt.equals(host)) { // If want to Transform, and host is trying to transform self, skip if not in alignment boolean skip = tgt.getTransformedTimestamp() != Long.parseLong(sa.getSVar("StoredTransform")); // Clear SVar from SA so it doesn't get reused accidentally @@ -65,7 +67,7 @@ public class SetStateEffect extends SpellAbilityEffect { } } - boolean hasTransformed = tgt.changeCardState(sa.getParam("Mode"), sa.getParam("NewState")); + boolean hasTransformed = tgt.changeCardState(mode, sa.getParam("NewState")); if ( hasTransformed ) { game.fireEvent(new GameEventCardStatsChanged(tgt)); }