mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
SetStateEffect: from this Effect, cards outside of the battlefield (like graveyard or exile) should not be able to transform.
This commit is contained in:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user