diff --git a/forge-game/src/main/java/forge/game/card/Card.java b/forge-game/src/main/java/forge/game/card/Card.java index f599141c659..89f97e8c6a5 100644 --- a/forge-game/src/main/java/forge/game/card/Card.java +++ b/forge-game/src/main/java/forge/game/card/Card.java @@ -7157,7 +7157,7 @@ public class Card extends GameEntity implements Comparable, IHasSVars, ITr return false; } - if (StaticAbilityCantTarget.cantTarget(this, sa)) { + if (StaticAbilityCantTarget.cantTarget(this, sa) != null) { return false; } diff --git a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java index cd96b6691d0..98a32ff3b00 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -4112,7 +4112,7 @@ public class CardFactoryUtil { sbValid.append("| ").append(param).append(k[1]); } - String effect = "Mode$ CantTarget | ValidCard$ Card.Self | Secondary$ True" + String effect = "Mode$ CantTarget | ValidTarget$ Card.Self | Secondary$ True" + sbValid.toString() + " | Activator$ Opponent | Description$ " + sbDesc.toString() + " (" + inst.getReminderText() + ")"; inst.addStaticAbility(StaticAbility.create(effect, state.getCard(), state, intrinsic)); @@ -4153,7 +4153,7 @@ public class CardFactoryUtil { inst.addStaticAbility(StaticAbility.create(effect, state.getCard(), state, intrinsic)); // Target - effect = "Mode$ CantTarget | ValidCard$ Card.Self | Secondary$ True "; + effect = "Mode$ CantTarget | ValidTarget$ Card.Self | Secondary$ True "; if (!valid.isEmpty()) { effect += "| ValidSource$ " + valid; } @@ -4182,7 +4182,7 @@ public class CardFactoryUtil { " | Description$ Chapter abilities of this Saga can't trigger the turn it entered the battlefield unless it has exactly the number of lore counters on it specified in the chapter symbol of that ability."; inst.addStaticAbility(StaticAbility.create(effect, state.getCard(), state, intrinsic)); } else if (keyword.equals("Shroud")) { - String effect = "Mode$ CantTarget | ValidCard$ Card.Self | Secondary$ True" + String effect = "Mode$ CantTarget | ValidTarget$ Card.Self | Secondary$ True" + " | Description$ Shroud (" + inst.getReminderText() + ")"; inst.addStaticAbility(StaticAbility.create(effect, state.getCard(), state, intrinsic)); } else if (keyword.equals("Skulk")) { diff --git a/forge-game/src/main/java/forge/game/player/Player.java b/forge-game/src/main/java/forge/game/player/Player.java index c6696a37733..b4f52c9b163 100644 --- a/forge-game/src/main/java/forge/game/player/Player.java +++ b/forge-game/src/main/java/forge/game/player/Player.java @@ -1084,7 +1084,7 @@ public class Player extends GameEntity implements Comparable { } // CantTarget static abilities - if (StaticAbilityCantTarget.cantTarget(this, sa)) { + if (StaticAbilityCantTarget.cantTarget(this, sa) != null) { return false; } diff --git a/forge-game/src/main/java/forge/game/player/PlayerFactoryUtil.java b/forge-game/src/main/java/forge/game/player/PlayerFactoryUtil.java index acecfcefb6d..34933815924 100644 --- a/forge-game/src/main/java/forge/game/player/PlayerFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/player/PlayerFactoryUtil.java @@ -23,21 +23,21 @@ public class PlayerFactoryUtil { sbValid.append("| ValidSource$ ").append(k[1]); } - String effect = "Mode$ CantTarget | ValidPlayer$ Player.You | Secondary$ True " + String effect = "Mode$ CantTarget | ValidTarget$ Player.You | Secondary$ True " + sbValid.toString() + " | Activator$ Opponent | EffectZone$ Command | Description$ " + sbDesc.toString() + " (" + inst.getReminderText() + ")"; final Card card = player.getKeywordCard(); inst.addStaticAbility(StaticAbility.create(effect, card, card.getCurrentState(), false)); } else if (keyword.equals("Shroud")) { - String effect = "Mode$ CantTarget | ValidPlayer$ Player.You | Secondary$ True " + String effect = "Mode$ CantTarget | ValidTarget$ Player.You | Secondary$ True " + "| EffectZone$ Command | Description$ Shroud (" + inst.getReminderText() + ")"; final Card card = player.getKeywordCard(); inst.addStaticAbility(StaticAbility.create(effect, card, card.getCurrentState(), false)); } else if (keyword.startsWith("Protection")) { String valid = CardFactoryUtil.getProtectionValid(keyword, false); - String effect = "Mode$ CantTarget | ValidPlayer$ Player.You | EffectZone$ Command | Secondary$ True "; + String effect = "Mode$ CantTarget | ValidTarget$ Player.You | EffectZone$ Command | Secondary$ True "; if (!valid.isEmpty()) { effect += "| ValidSource$ " + valid; } diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantTarget.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantTarget.java index ec214157f55..2fe2ddc3801 100644 --- a/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantTarget.java +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantTarget.java @@ -39,36 +39,20 @@ public class StaticAbilityCantTarget { static String MODE = "CantTarget"; - public static boolean cantTarget(final Card card, final SpellAbility spellAbility) { - final Game game = card.getGame(); + public static StaticAbility cantTarget(final GameEntity entity, final SpellAbility spellAbility) { + final Game game = entity.getGame(); for (final Card ca : game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) { for (final StaticAbility stAb : ca.getStaticAbilities()) { if (!stAb.checkConditions(StaticAbilityMode.CantTarget)) { continue; } - if (applyCantTargetAbility(stAb, card, spellAbility)) { - return true; + if (applyCantTargetAbility(stAb, entity, spellAbility)) { + return stAb; } } } - return false; - } - - public static boolean cantTarget(final Player player, final SpellAbility spellAbility) { - final Game game = player.getGame(); - for (final Card ca : game.getCardsIn(ZoneType.STATIC_ABILITIES_SOURCE_ZONES)) { - for (final StaticAbility stAb : ca.getStaticAbilities()) { - if (!stAb.checkConditions(StaticAbilityMode.CantTarget)) { - continue; - } - - if (applyCantTargetAbility(stAb, player, spellAbility)) { - return true; - } - } - } - return false; + return null; } /** @@ -82,57 +66,25 @@ public class StaticAbilityCantTarget { * the spell/ability * @return true, if successful */ - public static boolean applyCantTargetAbility(final StaticAbility stAb, final Card card, final SpellAbility spellAbility) { - if (stAb.hasParam("ValidPlayer")) { - return false; - } + public static boolean applyCantTargetAbility(final StaticAbility stAb, final GameEntity entity, final SpellAbility spellAbility) { + if (entity instanceof Card card) { + if (stAb.hasParam("AffectedZone")) { + if (ZoneType.listValueOf(stAb.getParam("AffectedZone")).stream().noneMatch(zt -> card.isInZone(zt))) { + return false; + } + } else if (!card.isInPlay()) { // default zone is battlefield + return false; + } + Set zones = stAb.getActiveZone(); - if (stAb.hasParam("AffectedZone")) { - boolean inZone = false; - for (final ZoneType zt : ZoneType.listValueOf(stAb.getParam("AffectedZone"))) { - if (card.isInZone(zt)) { - inZone = true; - break; + if (zones != null && zones.contains(ZoneType.Stack)) { + // Enthralling Hold: only works if it wasn't already cast + if (card.getGame().getStack().getSpellMatchingHost(spellAbility.getHostCard()) != null) { + return false; } } - - if (!inZone) { - return false; - } - } else { // default zone is battlefield - if (!card.isInPlay()) { - return false; - } - } - Set zones = stAb.getActiveZone(); - - if (zones != null && zones.contains(ZoneType.Stack)) { - // Enthralling Hold: only works if it wasn't already cast - if (card.getGame().getStack().getSpellMatchingHost(spellAbility.getHostCard()) != null) { - return false; - } } - if (!stAb.matchesValidParam("ValidCard", card)) { - return false; - } - - return common(stAb, card, spellAbility); - } - - public static boolean applyCantTargetAbility(final StaticAbility stAb, final Player player, final SpellAbility spellAbility) { - if (stAb.hasParam("ValidCard") || stAb.hasParam("AffectedZone")) { - return false; - } - - if (!stAb.matchesValidParam("ValidPlayer", player)) { - return false; - } - - return common(stAb, player, spellAbility); - } - - protected static boolean common(final StaticAbility stAb, GameEntity entity, final SpellAbility spellAbility) { final Card source = spellAbility.getHostCard(); final Player activator = spellAbility.getActivatingPlayer(); @@ -140,6 +92,10 @@ public class StaticAbilityCantTarget { return false; } + if (!stAb.matchesValidParam("ValidTarget", entity)) { + return false; + } + if (!stAb.matchesValidParam("ValidSA", spellAbility)) { return false; } diff --git a/forge-gui/res/cardsfolder/a/anti_magic_aura.txt b/forge-gui/res/cardsfolder/a/anti_magic_aura.txt index 83c603e5036..d7fb7fe5c32 100644 --- a/forge-gui/res/cardsfolder/a/anti_magic_aura.txt +++ b/forge-gui/res/cardsfolder/a/anti_magic_aura.txt @@ -3,6 +3,6 @@ ManaCost:2 U Types:Enchantment Aura K:Enchant:Creature SVar:AttachAILogic:Pump -S:Mode$ CantTarget | ValidCard$ Creature.EnchantedBy | ValidSA$ Spell | Description$ Enchanted creature can't be the target of spells. +S:Mode$ CantTarget | ValidTarget$ Creature.EnchantedBy | ValidSA$ Spell | Description$ Enchanted creature can't be the target of spells. S:Mode$ CantAttach | ValidCard$ Aura.Other | Target$ Creature.EnchantedBy | Description$ Enchanted creature can't be enchanted by other Auras. Oracle:Enchant creature\nEnchanted creature can't be the target of spells and can't be enchanted by other Auras. diff --git a/forge-gui/res/cardsfolder/a/artifact_ward.txt b/forge-gui/res/cardsfolder/a/artifact_ward.txt index 172b47b6594..1eab577bb59 100644 --- a/forge-gui/res/cardsfolder/a/artifact_ward.txt +++ b/forge-gui/res/cardsfolder/a/artifact_ward.txt @@ -5,5 +5,5 @@ K:Enchant:Creature SVar:AttachAILogic:Pump S:Mode$ CantBlockBy | ValidAttacker$ Creature.EnchantedBy | ValidBlocker$ Creature.Artifact | Description$ Enchanted creature can't be blocked by artifact creatures. R:Event$ DamageDone | Prevent$ True | ActiveZones$ Battlefield | ValidTarget$ Creature.EnchantedBy | ValidSource$ Artifact | Description$ Prevent all damage that would be dealt to enchanted creature by artifact sources. -S:Mode$ CantTarget | ValidCard$ Card.EnchantedBy | ValidSource$ Artifact | Description$ Enchanted creature can't be the target of abilities from artifact sources. +S:Mode$ CantTarget | ValidTarget$ Card.EnchantedBy | ValidSource$ Artifact | Description$ Enchanted creature can't be the target of abilities from artifact sources. Oracle:Enchant creature\nEnchanted creature can't be blocked by artifact creatures.\nPrevent all damage that would be dealt to enchanted creature by artifact sources.\nEnchanted creature can't be the target of abilities from artifact sources. diff --git a/forge-gui/res/cardsfolder/a/autumns_veil.txt b/forge-gui/res/cardsfolder/a/autumns_veil.txt index 63c4cfab594..7816beccb8a 100644 --- a/forge-gui/res/cardsfolder/a/autumns_veil.txt +++ b/forge-gui/res/cardsfolder/a/autumns_veil.txt @@ -3,7 +3,7 @@ ManaCost:G Types:Instant A:SP$ Effect | ReplacementEffects$ AntiMagic | StaticAbilities$ STCantBeTarget | SpellDescription$ Spells you control can't be countered by blue or black spells this turn, and creatures you control can't be the targets of blue or black spells this turn. SVar:AntiMagic:Event$ Counter | ValidSA$ Spell.YouCtrl | ValidCause$ Spell.Blue,Spell.Black | Layer$ CantHappen | Description$ Spells you control can't be countered by blue or black spells this turn. -SVar:STCantBeTarget:Mode$ CantTarget | ValidCard$ Creature.YouCtrl | ValidSource$ Card.Blue,Card.Black | ValidSA$ Spell | Description$ Creatures you control can't be the targets of blue or black spells this turn. +SVar:STCantBeTarget:Mode$ CantTarget | ValidTarget$ Creature.YouCtrl | ValidSource$ Card.Blue,Card.Black | ValidSA$ Spell | Description$ Creatures you control can't be the targets of blue or black spells this turn. AI:RemoveDeck:All AI:RemoveDeck:Random Oracle:Spells you control can't be countered by blue or black spells this turn, and creatures you control can't be the targets of blue or black spells this turn. diff --git a/forge-gui/res/cardsfolder/b/bartel_runeaxe.txt b/forge-gui/res/cardsfolder/b/bartel_runeaxe.txt index 085ad7c17b5..2f12c26953a 100644 --- a/forge-gui/res/cardsfolder/b/bartel_runeaxe.txt +++ b/forge-gui/res/cardsfolder/b/bartel_runeaxe.txt @@ -3,5 +3,5 @@ ManaCost:3 B R G Types:Legendary Creature Giant Warrior PT:6/5 K:Vigilance -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Aura | ValidSA$ Spell | Description$ CARDNAME can't be the target of Aura spells. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Aura | ValidSA$ Spell | Description$ CARDNAME can't be the target of Aura spells. Oracle:Vigilance\nBartel Runeaxe can't be the target of Aura spells. diff --git a/forge-gui/res/cardsfolder/c/canopy_cover.txt b/forge-gui/res/cardsfolder/c/canopy_cover.txt index a9bb6c2ea4d..5cdde51cf2b 100644 --- a/forge-gui/res/cardsfolder/c/canopy_cover.txt +++ b/forge-gui/res/cardsfolder/c/canopy_cover.txt @@ -4,5 +4,5 @@ Types:Enchantment Aura K:Enchant:Creature SVar:AttachAILogic:Pump S:Mode$ CantBlockBy | ValidAttacker$ Creature.EnchantedBy | ValidBlocker$ Creature.withoutFlying+withoutReach | Description$ Enchanted creature can't be blocked except by creatures with flying or reach. -S:Mode$ CantTarget | ValidCard$ Card.EnchantedBy | Activator$ Opponent | Description$ Enchanted creature can't be the target of spells or abilities your opponents control. +S:Mode$ CantTarget | ValidTarget$ Card.EnchantedBy | Activator$ Opponent | Description$ Enchanted creature can't be the target of spells or abilities your opponents control. Oracle:Enchant creature\nEnchanted creature can't be blocked except by creatures with flying or reach.\nEnchanted creature can't be the target of spells or abilities your opponents control. diff --git a/forge-gui/res/cardsfolder/d/dense_foliage.txt b/forge-gui/res/cardsfolder/d/dense_foliage.txt index 480cbfcacf3..13cdbafaf91 100644 --- a/forge-gui/res/cardsfolder/d/dense_foliage.txt +++ b/forge-gui/res/cardsfolder/d/dense_foliage.txt @@ -1,7 +1,7 @@ Name:Dense Foliage ManaCost:2 G Types:Enchantment -S:Mode$ CantTarget | ValidCard$ Creature | ValidSA$ Spell | Description$ Creatures can't be the target of spells. +S:Mode$ CantTarget | ValidTarget$ Creature | ValidSA$ Spell | Description$ Creatures can't be the target of spells. SVar:NonStackingEffect:True AI:RemoveDeck:Random Oracle:Creatures can't be the targets of spells. diff --git a/forge-gui/res/cardsfolder/d/display_of_dominance.txt b/forge-gui/res/cardsfolder/d/display_of_dominance.txt index 0cb3094a462..6bd430e7a27 100644 --- a/forge-gui/res/cardsfolder/d/display_of_dominance.txt +++ b/forge-gui/res/cardsfolder/d/display_of_dominance.txt @@ -4,6 +4,6 @@ Types:Instant A:SP$ Charm | Choices$ DBDestroy,DBProtect SVar:DBDestroy:DB$ Destroy | ValidTgts$ Permanent.nonCreature+Blue,Permanent.nonCreature+Black | TgtPrompt$ Select target blue or black noncreature permanent | SpellDescription$ Destroy target blue or black noncreature permanent. SVar:DBProtect:DB$ Effect | StaticAbilities$ STCantBeTarget | SpellDescription$ Permanents you control can't be the targets of blue or black spells your opponents control this turn. -SVar:STCantBeTarget:Mode$ CantTarget | ValidCard$ Permanent.YouCtrl | ValidSource$ Card.Blue+OppCtrl,Card.Black+OppCtrl | ValidSA$ Spell | Description$ Permanents you control can't be the targets of blue or black spells your opponents control this turn. +SVar:STCantBeTarget:Mode$ CantTarget | ValidTarget$ Permanent.YouCtrl | ValidSource$ Card.Blue+OppCtrl,Card.Black+OppCtrl | ValidSA$ Spell | Description$ Permanents you control can't be the targets of blue or black spells your opponents control this turn. AI:RemoveDeck:Random Oracle:Choose one —\n• Destroy target blue or black noncreature permanent.\n• Permanents you control can't be the targets of blue or black spells your opponents control this turn. diff --git a/forge-gui/res/cardsfolder/d/dream_leash.txt b/forge-gui/res/cardsfolder/d/dream_leash.txt index 986b3b29262..8357da4ebdd 100644 --- a/forge-gui/res/cardsfolder/d/dream_leash.txt +++ b/forge-gui/res/cardsfolder/d/dream_leash.txt @@ -4,6 +4,6 @@ Types:Enchantment Aura K:Enchant:Permanent SVar:AttachAITgts:Permanent.tapped SVar:AttachAILogic:GainControl -S:Mode$ CantTarget | EffectZone$ Stack | ValidSource$ Spell.Self | ValidCard$ Permanent.untapped | Description$ You can't choose an untapped permanent as this spell's target as you cast it. +S:Mode$ CantTarget | ValidTarget$ Permanent.untapped | EffectZone$ Stack | ValidSource$ Spell.Self | Description$ You can't choose an untapped permanent as this spell's target as you cast it. S:Mode$ Continuous | Affected$ Card.EnchantedBy | GainControl$ You | Description$ You control enchanted permanent. Oracle:Enchant permanent\nYou can't choose an untapped permanent as this spell's target as you cast it.\nYou control enchanted permanent. diff --git a/forge-gui/res/cardsfolder/e/enthralling_hold.txt b/forge-gui/res/cardsfolder/e/enthralling_hold.txt index 2dfdd22d04c..97dcdbcbdc7 100644 --- a/forge-gui/res/cardsfolder/e/enthralling_hold.txt +++ b/forge-gui/res/cardsfolder/e/enthralling_hold.txt @@ -4,6 +4,6 @@ Types:Enchantment Aura K:Enchant:Creature SVar:AttachAITgts:Creature.tapped SVar:AttachAILogic:GainControl -S:Mode$ CantTarget | EffectZone$ Stack | ValidSource$ Spell.Self | ValidCard$ Creature.untapped | Description$ You can't choose an untapped creature as this spell's target as you cast it. +S:Mode$ CantTarget | ValidTarget$ Creature.untapped | EffectZone$ Stack | ValidSource$ Spell.Self | Description$ You can't choose an untapped creature as this spell's target as you cast it. S:Mode$ Continuous | Affected$ Card.EnchantedBy | GainControl$ You | Description$ You control enchanted creature. Oracle:Enchant creature\nYou can't choose an untapped creature as this spell's target as you cast it.\nYou control enchanted creature. diff --git a/forge-gui/res/cardsfolder/f/fiendslayer_paladin.txt b/forge-gui/res/cardsfolder/f/fiendslayer_paladin.txt index 19b124a74ad..61f9f2dc32d 100644 --- a/forge-gui/res/cardsfolder/f/fiendslayer_paladin.txt +++ b/forge-gui/res/cardsfolder/f/fiendslayer_paladin.txt @@ -4,5 +4,5 @@ Types:Creature Human Knight PT:2/2 K:First Strike K:Lifelink -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.Black,Card.Red | ValidSA$ Spell | Activator$ Opponent | Description$ CARDNAME can't be the target of black or red spells your opponents control. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Card.Black,Card.Red | ValidSA$ Spell | Activator$ Opponent | Description$ CARDNAME can't be the target of black or red spells your opponents control. Oracle:First strike (This creature deals combat damage before creatures without first strike.)\nLifelink (Damage dealt by this creature also causes you to gain that much life.)\nFiendslayer Paladin can't be the target of black or red spells your opponents control. diff --git a/forge-gui/res/cardsfolder/g/gaeas_revenge.txt b/forge-gui/res/cardsfolder/g/gaeas_revenge.txt index e5e40f30116..0ccff68d102 100644 --- a/forge-gui/res/cardsfolder/g/gaeas_revenge.txt +++ b/forge-gui/res/cardsfolder/g/gaeas_revenge.txt @@ -4,5 +4,5 @@ Types:Creature Elemental PT:8/5 R:Event$ Counter | ValidCard$ Card.Self | ValidSA$ Spell | Layer$ CantHappen | Description$ This spell can't be countered. K:Haste -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.nonGreen | Description$ CARDNAME can't be the target of nongreen spells or abilities from nongreen sources. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Card.nonGreen | Description$ CARDNAME can't be the target of nongreen spells or abilities from nongreen sources. Oracle:This spell can't be countered.\nHaste\nGaea's Revenge can't be the target of nongreen spells or abilities from nongreen sources. diff --git a/forge-gui/res/cardsfolder/k/karplusan_strider.txt b/forge-gui/res/cardsfolder/k/karplusan_strider.txt index 57ec938cf65..7402af01c4c 100644 --- a/forge-gui/res/cardsfolder/k/karplusan_strider.txt +++ b/forge-gui/res/cardsfolder/k/karplusan_strider.txt @@ -2,5 +2,5 @@ Name:Karplusan Strider ManaCost:3 G Types:Creature Yeti PT:3/4 -S:Mode$ CantTarget | ValidSA$ Spell | ValidCard$ Card.Self | ValidSource$ Card.Blue,Card.Black | Description$ CARDNAME can't be the target of blue or black spells. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSA$ Spell | ValidSource$ Card.Blue,Card.Black | Description$ CARDNAME can't be the target of blue or black spells. Oracle:Karplusan Strider can't be the target of blue or black spells. diff --git a/forge-gui/res/cardsfolder/l/lurker.txt b/forge-gui/res/cardsfolder/l/lurker.txt index 62022f11fce..d376d2962bf 100644 --- a/forge-gui/res/cardsfolder/l/lurker.txt +++ b/forge-gui/res/cardsfolder/l/lurker.txt @@ -2,5 +2,5 @@ Name:Lurker ManaCost:2 G Types:Creature Beast PT:2/3 -S:Mode$ CantTarget | ValidCard$ Card.Self+!attackedThisTurn+!blockedThisTurn | ValidSA$ Spell | Description$ CARDNAME can't be the target of spells unless it attacked or blocked this turn. +S:Mode$ CantTarget | ValidTarget$ Card.Self+!attackedThisTurn+!blockedThisTurn | ValidSA$ Spell | Description$ CARDNAME can't be the target of spells unless it attacked or blocked this turn. Oracle:Lurker can't be the target of spells unless it attacked or blocked this turn. diff --git a/forge-gui/res/cardsfolder/m/mercenary_informer.txt b/forge-gui/res/cardsfolder/m/mercenary_informer.txt index 6394ae49401..638074630ba 100644 --- a/forge-gui/res/cardsfolder/m/mercenary_informer.txt +++ b/forge-gui/res/cardsfolder/m/mercenary_informer.txt @@ -2,6 +2,6 @@ Name:Mercenary Informer ManaCost:2 W Types:Creature Human Rebel Mercenary PT:2/1 -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.Black | Description$ CARDNAME can't be the target of black spells or abilities from black sources. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Card.Black | Description$ CARDNAME can't be the target of black spells or abilities from black sources. A:AB$ ChangeZone | Cost$ 2 W | ValidTgts$ Mercenary | IsCurse$ True | TgtPrompt$ Select target Mercenary | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SpellDescription$ Put target Mercenary on the bottom of its owner's library. Oracle:Mercenary Informer can't be the target of black spells or abilities from black sources.\n{2}{W}: Put target nontoken Mercenary on the bottom of its owner's library. diff --git a/forge-gui/res/cardsfolder/p/peace_talks.txt b/forge-gui/res/cardsfolder/p/peace_talks.txt index 5b5a749263f..0ea21ebf9bb 100644 --- a/forge-gui/res/cardsfolder/p/peace_talks.txt +++ b/forge-gui/res/cardsfolder/p/peace_talks.txt @@ -3,6 +3,5 @@ ManaCost:1 W Types:Sorcery A:SP$ Effect | AILogic$ PeaceTalks | Stackable$ False | StaticAbilities$ STCantAttack,STCantTarget,STCantTargetPlayer | Duration$ ThisTurnAndNextTurn | SpellDescription$ This turn and next turn, creatures can't attack, and players and permanents can't be the targets of spells or activated abilities. SVar:STCantAttack:Mode$ CantAttack | ValidCard$ Creature | Description$ Creatures can't attack. -SVar:STCantTarget:Mode$ CantTarget | ValidCard$ Permanent | ValidSA$ Spell,Activated | Description$ Permanents can't be the targets of spells or activated abilities. -SVar:STCantTargetPlayer:Mode$ CantTarget | ValidPlayer$ Player | ValidSA$ Spell,Activated | Description$ Players can't be the targets of spells or activated abilities. +SVar:STCantTarget:Mode$ CantTarget | ValidTarget$ Card.Permanent,Player | ValidSA$ Spell,Activated | Description$ Players and Permanents can't be the targets of spells or activated abilities. Oracle:This turn and next turn, creatures can't attack, and players and permanents can't be the targets of spells or activated abilities. diff --git a/forge-gui/res/cardsfolder/r/raiding_party.txt b/forge-gui/res/cardsfolder/r/raiding_party.txt index bd9a036f117..402ca6ef8d4 100644 --- a/forge-gui/res/cardsfolder/r/raiding_party.txt +++ b/forge-gui/res/cardsfolder/r/raiding_party.txt @@ -1,7 +1,7 @@ Name:Raiding Party ManaCost:2 R Types:Enchantment -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.White | Description$ CARDNAME can't be the target of white spells or abilities from white sources. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Card.White | Description$ CARDNAME can't be the target of white spells or abilities from white sources. A:AB$ RepeatEach | Cost$ Sac<1/Orc/Orc> | CostDesc$ Sacrifice an Orc: | RepeatPlayers$ Player | RepeatSubAbility$ DBTap | SubAbility$ DBDestroy | SpellDescription$ Each player may tap any number of untapped white creatures they control. For each creature tapped this way, that player chooses up to two Plains. Then destroy all Plains that weren't chosen this way by any player. SVar:DBTap:DB$ Tap | CardChoices$ Creature.untapped+White+RememberedPlayerCtrl | Tapper$ RememberedPlayer | AnyNumber$ True | ChoiceAmount$ Count$Valid Creature.untapped+White+RememberedPlayerCtrl | RememberTapped$ True | SubAbility$ ChoosePlainsToSave SVar:ChoosePlainsToSave:DB$ ChooseCard | Defined$ Remembered | MinAmount$ 0 | Amount$ TappedXTwo | Choices$ Plains | ChoiceTitle$ Choose up to two Plains for each creature tapped | ChoiceZone$ Battlefield | ImprintChosen$ True | AILogic$ OwnCard | SubAbility$ DBCleanup diff --git a/forge-gui/res/cardsfolder/r/rebel_informer.txt b/forge-gui/res/cardsfolder/r/rebel_informer.txt index 4af31ee9a4a..59da120ccf1 100644 --- a/forge-gui/res/cardsfolder/r/rebel_informer.txt +++ b/forge-gui/res/cardsfolder/r/rebel_informer.txt @@ -2,6 +2,6 @@ Name:Rebel Informer ManaCost:2 B Types:Creature Human Mercenary Rebel PT:1/2 -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.White | Description$ CARDNAME can't be the target of white spells or abilities from white sources. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Card.White | Description$ CARDNAME can't be the target of white spells or abilities from white sources. A:AB$ ChangeZone | Cost$ 3 | ValidTgts$ Rebel.!token | IsCurse$ True | TgtPrompt$ Select target Rebel | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | SpellDescription$ Put target nontoken Rebel on the bottom of its owner's library. Oracle:Rebel Informer can't be the target of white spells or abilities from white sources.\n{3}: Put target nontoken Rebel on the bottom of its owner's library. diff --git a/forge-gui/res/cardsfolder/s/shanna_sisays_legacy.txt b/forge-gui/res/cardsfolder/s/shanna_sisays_legacy.txt index 2a4edc6da5c..e49950485a2 100644 --- a/forge-gui/res/cardsfolder/s/shanna_sisays_legacy.txt +++ b/forge-gui/res/cardsfolder/s/shanna_sisays_legacy.txt @@ -2,7 +2,7 @@ Name:Shanna, Sisay's Legacy ManaCost:G W Types:Legendary Creature Human Warrior PT:0/0 -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSA$ Activated,Triggered | Activator$ Player.Opponent | Description$ CARDNAME can't be the target of abilities your opponents control. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSA$ Activated,Triggered | Activator$ Player.Opponent | Description$ CARDNAME can't be the target of abilities your opponents control. S:Mode$ Continuous | Affected$ Card.Self | AddPower$ X | AddToughness$ X | Description$ NICKNAME gets +1/+1 for each creature you control. SVar:X:Count$Valid Creature.YouCtrl SVar:BuffedBy:Creature diff --git a/forge-gui/res/cardsfolder/s/shielding_plax.txt b/forge-gui/res/cardsfolder/s/shielding_plax.txt index 09bd6029230..4b446ff0266 100644 --- a/forge-gui/res/cardsfolder/s/shielding_plax.txt +++ b/forge-gui/res/cardsfolder/s/shielding_plax.txt @@ -3,7 +3,7 @@ ManaCost:2 GU Types:Enchantment Aura K:Enchant:Creature SVar:AttachAILogic:Pump -S:Mode$ CantTarget | ValidCard$ Card.EnchantedBy | Activator$ Opponent | Description$ Enchanted creature can't be the target of spells or abilities your opponents control. +S:Mode$ CantTarget | ValidTarget$ Card.EnchantedBy | Activator$ Opponent | Description$ Enchanted creature can't be the target of spells or abilities your opponents control. T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigDraw | TriggerDescription$ When CARDNAME enters, draw a card. SVar:TrigDraw:DB$ Draw | Defined$ You | NumCards$ 1 Oracle:({G/U} can be paid with either {G} or {U}.)\nEnchant creature\nWhen Shielding Plax enters, draw a card.\nEnchanted creature can't be the target of spells or abilities your opponents control. diff --git a/forge-gui/res/cardsfolder/s/spectral_shield.txt b/forge-gui/res/cardsfolder/s/spectral_shield.txt index 4e7b901c580..a73c5dee30b 100644 --- a/forge-gui/res/cardsfolder/s/spectral_shield.txt +++ b/forge-gui/res/cardsfolder/s/spectral_shield.txt @@ -4,5 +4,5 @@ Types:Enchantment Aura K:Enchant:Creature SVar:AttachAILogic:Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddToughness$ 2 | Description$ Enchanted creature gets +0/+2 and can't be the target of spells. -S:Mode$ CantTarget | ValidCard$ Creature.EnchantedBy | ValidSA$ Spell | Secondary$ True | Description$ Enchanted creature gets +0/+2 and can't be the target of spells. +S:Mode$ CantTarget | ValidTarget$ Creature.EnchantedBy | ValidSA$ Spell | Secondary$ True | Description$ Enchanted creature gets +0/+2 and can't be the target of spells. Oracle:Enchant creature\nEnchanted creature gets +0/+2 and can't be the target of spells. diff --git a/forge-gui/res/cardsfolder/s/spellbane_centaur.txt b/forge-gui/res/cardsfolder/s/spellbane_centaur.txt index 96ef54cdf81..6fa8546a942 100644 --- a/forge-gui/res/cardsfolder/s/spellbane_centaur.txt +++ b/forge-gui/res/cardsfolder/s/spellbane_centaur.txt @@ -2,5 +2,5 @@ Name:Spellbane Centaur ManaCost:2 G Types:Creature Centaur PT:3/2 -S:Mode$ CantTarget | ValidCard$ Creature.YouCtrl | ValidSource$ Card.Blue | Description$ Creatures you control can't be the targets of blue spells or abilities from blue sources. +S:Mode$ CantTarget | ValidTarget$ Creature.YouCtrl | ValidSource$ Card.Blue | Description$ Creatures you control can't be the targets of blue spells or abilities from blue sources. Oracle:Creatures you control can't be the targets of blue spells or abilities from blue sources. diff --git a/forge-gui/res/cardsfolder/s/suqata_firewalker.txt b/forge-gui/res/cardsfolder/s/suqata_firewalker.txt index e7a16a7f747..dee14c0fc82 100644 --- a/forge-gui/res/cardsfolder/s/suqata_firewalker.txt +++ b/forge-gui/res/cardsfolder/s/suqata_firewalker.txt @@ -2,6 +2,6 @@ Name:Suq'Ata Firewalker ManaCost:1 U U Types:Creature Human Wizard PT:0/1 -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.Red | Description$ CARDNAME can't be the target of red spells or abilities from red sources. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Card.Red | Description$ CARDNAME can't be the target of red spells or abilities from red sources. A:AB$ DealDamage | Cost$ T | ValidTgts$ Any | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to any target. Oracle:Suq'Ata Firewalker can't be the target of red spells or abilities from red sources.\n{T}: Suq'Ata Firewalker deals 1 damage to any target. diff --git a/forge-gui/res/cardsfolder/t/tetsuo_umezawa.txt b/forge-gui/res/cardsfolder/t/tetsuo_umezawa.txt index adc3d2abc9b..f9e59d50544 100644 --- a/forge-gui/res/cardsfolder/t/tetsuo_umezawa.txt +++ b/forge-gui/res/cardsfolder/t/tetsuo_umezawa.txt @@ -2,6 +2,6 @@ Name:Tetsuo Umezawa ManaCost:U B R Types:Legendary Creature Human Archer PT:3/3 -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Aura | ValidSA$ Spell | Description$ CARDNAME can't be the target of Aura spells. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Aura | ValidSA$ Spell | Description$ CARDNAME can't be the target of Aura spells. A:AB$ Destroy | Cost$ U B B R T | ValidTgts$ Creature.tapped,Creature.blocking | TgtPrompt$ Select target tapped or blocking creature | SpellDescription$ Destroy target tapped or blocking creature. Oracle:Tetsuo Umezawa can't be the target of Aura spells.\n{U}{B}{B}{R}, {T}: Destroy target tapped or blocking creature. diff --git a/forge-gui/res/cardsfolder/t/thrun_breaker_of_silence.txt b/forge-gui/res/cardsfolder/t/thrun_breaker_of_silence.txt index 53b55eaa654..cb9133f70c2 100644 --- a/forge-gui/res/cardsfolder/t/thrun_breaker_of_silence.txt +++ b/forge-gui/res/cardsfolder/t/thrun_breaker_of_silence.txt @@ -4,6 +4,6 @@ Types:Legendary Creature Troll Shaman PT:5/5 R:Event$ Counter | ValidCard$ Card.Self | ValidSA$ Spell | Layer$ CantHappen | Description$ This spell can't be countered. K:Trample -S:Mode$ CantTarget | ValidCard$ Card.Self | ValidSource$ Card.nonGreen+OppCtrl | Description$ CARDNAME can't be the target of nongreen spells your opponents control or abilities from nongreen sources your opponents control. +S:Mode$ CantTarget | ValidTarget$ Card.Self | ValidSource$ Card.nonGreen+OppCtrl | Description$ CARDNAME can't be the target of nongreen spells your opponents control or abilities from nongreen sources your opponents control. S:Mode$ Continuous | Affected$ Card.Self | AddKeyword$ Indestructible | Condition$ PlayerTurn | Description$ During your turn, NICKNAME has indestructible. Oracle:This spell can't be countered.\nTrample\nThrun, Breaker of Silence can't be the target of nongreen spells your opponents control or abilities from nongreen sources your opponents control.\nDuring your turn, Thrun has indestructible. diff --git a/forge-gui/res/cardsfolder/t/tomik_distinguished_advokist.txt b/forge-gui/res/cardsfolder/t/tomik_distinguished_advokist.txt index d3b1b2c154d..1b9ae85d535 100644 --- a/forge-gui/res/cardsfolder/t/tomik_distinguished_advokist.txt +++ b/forge-gui/res/cardsfolder/t/tomik_distinguished_advokist.txt @@ -3,6 +3,6 @@ ManaCost:W W Types:Legendary Creature Human Advisor PT:2/3 K:Flying -S:Mode$ CantTarget | AffectedZone$ Battlefield,Graveyard | ValidCard$ Land | Activator$ Opponent | Description$ Lands on the battlefield and land cards in graveyards can't be the targets of spells or abilities your opponents control. +S:Mode$ CantTarget | ValidTarget$ Land | AffectedZone$ Battlefield,Graveyard | Activator$ Opponent | Description$ Lands on the battlefield and land cards in graveyards can't be the targets of spells or abilities your opponents control. S:Mode$ CantPlayLand | ValidCard$ Land | Player$ Opponent | Origin$ Graveyard | Description$ Your opponents can't play land cards from graveyards. Oracle:Flying\nLands on the battlefield and land cards in graveyards can't be the targets of spells or abilities your opponents control.\nYour opponents can't play land cards from graveyards. diff --git a/forge-gui/res/cardsfolder/v/veilstone_amulet.txt b/forge-gui/res/cardsfolder/v/veilstone_amulet.txt index bd23b0a4f20..4c708d9c135 100644 --- a/forge-gui/res/cardsfolder/v/veilstone_amulet.txt +++ b/forge-gui/res/cardsfolder/v/veilstone_amulet.txt @@ -3,7 +3,7 @@ ManaCost:3 Types:Artifact T:Mode$ SpellCast | ValidCard$ Card | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigEffect | TriggerDescription$ Whenever you cast a spell, creatures you control can't be the targets of spells or abilities your opponents control this turn. SVar:TrigEffect:DB$ Effect | StaticAbilities$ CantTarget -SVar:CantTarget:Mode$ CantTarget | ValidCard$ Creature.YouCtrl | Activator$ Opponent | Description$ Creatures you control can't be the targets of spells or abilities your opponents control. +SVar:CantTarget:Mode$ CantTarget | ValidTarget$ Creature.YouCtrl | Activator$ Opponent | Description$ Creatures you control can't be the targets of spells or abilities your opponents control. SVar:BuffedBy:Card AI:RemoveDeck:Random Oracle:Whenever you cast a spell, creatures you control can't be the targets of spells or abilities your opponents control this turn. diff --git a/forge-gui/res/cardsfolder/v/vines_of_vastwood.txt b/forge-gui/res/cardsfolder/v/vines_of_vastwood.txt index 59185119b8f..db766cb9809 100644 --- a/forge-gui/res/cardsfolder/v/vines_of_vastwood.txt +++ b/forge-gui/res/cardsfolder/v/vines_of_vastwood.txt @@ -4,6 +4,6 @@ Types:Instant K:Kicker:G A:SP$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +X | NumDef$ +X | SubAbility$ DBEffect | SpellDescription$ Target creature can't be the target of spells or abilities your opponents control this turn. If this spell was kicked, that creature gets +4/+4 until end of turn. SVar:DBEffect:DB$ Effect | Defined$ Targeted | AILogic$ Always | StaticAbilities$ STCantTarget | RememberObjects$ Targeted | ExileOnMoved$ Battlefield -SVar:STCantTarget:Mode$ CantTarget | ValidCard$ Card.IsRemembered | Activator$ Player.Opponent | Description$ Target creature can't be the target of spells or abilities your opponents control this turn. +SVar:STCantTarget:Mode$ CantTarget | ValidTarget$ Card.IsRemembered | Activator$ Player.Opponent | Description$ Target creature can't be the target of spells or abilities your opponents control this turn. SVar:X:Count$Kicked.4.0 Oracle:Kicker {G} (You may pay an additional {G} as you cast this spell.)\nTarget creature can't be the target of spells or abilities your opponents control this turn. If this spell was kicked, that creature gets +4/+4 until end of turn. diff --git a/forge-gui/res/cardsfolder/w/wall_of_shadows.txt b/forge-gui/res/cardsfolder/w/wall_of_shadows.txt index cae8d55bbe9..1769231c074 100644 --- a/forge-gui/res/cardsfolder/w/wall_of_shadows.txt +++ b/forge-gui/res/cardsfolder/w/wall_of_shadows.txt @@ -4,6 +4,6 @@ Types:Creature Wall PT:0/1 K:Defender R:Event$ DamageDone | Prevent$ True | ValidSource$ Creature.blockedBySource | ValidTarget$ Creature.Self | Description$ Prevent all damage that would be dealt to CARDNAME by creatures it's blocking. -S:Mode$ CantTarget | ValidCard$ Card.Self | SourceCanOnlyTarget$ Wall | Description$ CARDNAME can't be the target of spells that can target only Walls or of abilities that can target only Walls. +S:Mode$ CantTarget | ValidTarget$ Card.Self | SourceCanOnlyTarget$ Wall | Description$ CARDNAME can't be the target of spells that can target only Walls or of abilities that can target only Walls. AI:RemoveDeck:All Oracle:Defender (This creature can't attack.)\nPrevent all damage that would be dealt to Wall of Shadows by creatures it's blocking.\nWall of Shadows can't be the target of spells that can target only Walls or of abilities that can target only Walls.