SetStateEffect: from this Effect, cards outside of the battlefield (like graveyard or exile) should not be able to transform.

This commit is contained in:
Hanmac
2016-05-31 02:31:04 +00:00
parent 41479cc3cf
commit 2808a03631

View File

@@ -3,6 +3,7 @@ package forge.game.ability.effects;
import forge.game.Game;
import forge.game.ability.SpellAbilityEffect;
import forge.game.card.Card;
import forge.game.zone.ZoneType;
import forge.game.event.GameEventCardStatsChanged;
import forge.game.spellability.SpellAbility;
@@ -49,6 +50,11 @@ public class SetStateEffect extends SpellAbilityEffect {
continue;
}
// Cards which are not on the battlefield should not be able to transform.
if (!tgt.isInZone(ZoneType.Battlefield)) {
continue;
}
if ("Transform".equals(sa.getParam("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"));