From c358f4e71f98f00cf449bc8eaa4eba8c592e7d68 Mon Sep 17 00:00:00 2001 From: Renato Filipe Vidal Santos <45150760+dracontes@users.noreply.github.com> Date: Sat, 22 Feb 2025 20:38:15 +0000 Subject: [PATCH] Negation cleanup: IsNotCommander (#7064) --- forge-game/src/main/java/forge/game/card/CardProperty.java | 4 ---- forge-gui/res/cardsfolder/b/become_the_pilot.txt | 2 +- forge-gui/res/cardsfolder/l/lozhan_dragons_legacy.txt | 2 +- forge-gui/res/cardsfolder/s/shield_broker.txt | 2 +- forge-gui/res/cardsfolder/s/slash_the_ranks.txt | 2 +- forge-gui/res/cardsfolder/s/subjugate_the_hobbits.txt | 2 +- forge-gui/res/cardsfolder/t/the_peregrine_dynamo.txt | 2 +- forge-gui/res/cardsfolder/y/you_will_know_true_suffering.txt | 2 +- forge-gui/src/main/java/forge/gui/card/CardScriptParser.java | 2 +- 9 files changed, 8 insertions(+), 12 deletions(-) diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index 7a30590eaaa..7b96e425e8c 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -2023,10 +2023,6 @@ public class CardProperty { if (!card.isCommander()) { return false; } - } else if (property.equals("IsNotCommander")) { - if (card.isCommander()) { - return false; - } } else if (property.startsWith("NotedFor")) { final String key = property.substring("NotedFor".length()); for (String note : sourceController.getNotesForName(key)) { diff --git a/forge-gui/res/cardsfolder/b/become_the_pilot.txt b/forge-gui/res/cardsfolder/b/become_the_pilot.txt index 9b1d2ceeaec..09ef09f8ec3 100644 --- a/forge-gui/res/cardsfolder/b/become_the_pilot.txt +++ b/forge-gui/res/cardsfolder/b/become_the_pilot.txt @@ -2,7 +2,7 @@ Name:Become the Pilot ManaCost:3 U U Types:Enchantment Aura K:Enchant noncommander creature -A:SP$ Attach | ValidTgts$ Creature.IsNotCommander | TgtPrompt$ Select target noncommander creature | AILogic$ GainControl +A:SP$ Attach | ValidTgts$ Creature.!IsCommander | TgtPrompt$ Select target noncommander creature | AILogic$ GainControl S:Mode$ Continuous | Affected$ Creature.EnchantedBy | GainControl$ You | Description$ You control enchanted creature. S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 2 | AddToughness$ 2 | Description$ Enchanted creature gets +2/+2 and can't be blocked unless it's attacking its owner or a permanent its owner controls. S:Mode$ CantBlockBy | ValidAttacker$ Creature.EnchantedBy | ValidBlocker$ Creature.!ControlledBy EnchantedOwner diff --git a/forge-gui/res/cardsfolder/l/lozhan_dragons_legacy.txt b/forge-gui/res/cardsfolder/l/lozhan_dragons_legacy.txt index f1e047db2ac..62c7b29e4eb 100644 --- a/forge-gui/res/cardsfolder/l/lozhan_dragons_legacy.txt +++ b/forge-gui/res/cardsfolder/l/lozhan_dragons_legacy.txt @@ -4,7 +4,7 @@ Types:Legendary Creature Dragon Shaman PT:4/2 K:Flying T:Mode$ SpellCast | ValidCard$ Card.Adventure,Dragon | ValidActivatingPlayer$ You | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast an Adventure spell or Dragon spell, CARDNAME deals damage equal to that spell's mana value to any target that isn't a commander. -SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Any.IsNotCommander | TgtPrompt$ Select any target that isn't a commander | NumDmg$ X +SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Any.!IsCommander | TgtPrompt$ Select any target that isn't a commander | NumDmg$ X SVar:X:TriggeredStackInstance$CardManaCostLKI SVar:BuffedBy:Creature.AdventureCard,Dragon DeckHints:Type$Adventure|Dragon diff --git a/forge-gui/res/cardsfolder/s/shield_broker.txt b/forge-gui/res/cardsfolder/s/shield_broker.txt index a388fd341fc..62ff78fbc26 100644 --- a/forge-gui/res/cardsfolder/s/shield_broker.txt +++ b/forge-gui/res/cardsfolder/s/shield_broker.txt @@ -3,7 +3,7 @@ ManaCost:3 U U Types:Creature Octopus Advisor PT:3/4 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigPutCounter | TriggerDescription$ When CARDNAME enters, put a shield counter on target noncommander creature you don't control. You gain control of that creature for as long as it has a shield counter on it. (If it would be dealt damage or destroyed, remove a shield counter from it instead.) -SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.IsNotCommander+YouDontCtrl | TgtPrompt$ Select target noncommander creature you don't control | CounterType$ SHIELD | SubAbility$ DBEffect +SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature.!IsCommander+YouDontCtrl | TgtPrompt$ Select target noncommander creature you don't control | CounterType$ SHIELD | SubAbility$ DBEffect SVar:DBEffect:DB$ Effect | RememberObjects$ Targeted | StaticAbilities$ GainControl | ForgetOnMoved$ Battlefield | ForgetCounter$ SHIELD | Duration$ Permanent SVar:GainControl:Mode$ Continuous | Affected$ Card.IsRemembered | GainControl$ You | Description$ You gain control of that creature for as long as it has a shield counter on it. Oracle:When Shield Broker enters, put a shield counter on target noncommander creature you don't control. You gain control of that creature for as long as it has a shield counter on it. (If it would be dealt damage or destroyed, remove a shield counter from it instead.) diff --git a/forge-gui/res/cardsfolder/s/slash_the_ranks.txt b/forge-gui/res/cardsfolder/s/slash_the_ranks.txt index 06b6c97aea3..e5c17221514 100644 --- a/forge-gui/res/cardsfolder/s/slash_the_ranks.txt +++ b/forge-gui/res/cardsfolder/s/slash_the_ranks.txt @@ -1,5 +1,5 @@ Name:Slash the Ranks ManaCost:3 W W Types:Sorcery -A:SP$ DestroyAll | ValidCards$ Creature.IsNotCommander,Planeswalker.IsNotCommander | SpellDescription$ Destroy all creatures and planeswalkers except for commanders. +A:SP$ DestroyAll | ValidCards$ Creature.!IsCommander,Planeswalker.!IsCommander | SpellDescription$ Destroy all creatures and planeswalkers except for commanders. Oracle:Destroy all creatures and planeswalkers except for commanders. diff --git a/forge-gui/res/cardsfolder/s/subjugate_the_hobbits.txt b/forge-gui/res/cardsfolder/s/subjugate_the_hobbits.txt index ca69b6e9a02..3db4cd25ae0 100644 --- a/forge-gui/res/cardsfolder/s/subjugate_the_hobbits.txt +++ b/forge-gui/res/cardsfolder/s/subjugate_the_hobbits.txt @@ -1,5 +1,5 @@ Name:Subjugate the Hobbits ManaCost:5 U U Types:Sorcery -A:SP$ GainControl | AllValid$ Creature.IsNotCommander+cmcLE3 | NewController$ You | SpellDescription$ Gain control of each noncommander creature with mana value 3 or less. +A:SP$ GainControl | AllValid$ Creature.!IsCommander+cmcLE3 | NewController$ You | SpellDescription$ Gain control of each noncommander creature with mana value 3 or less. Oracle:Gain control of each noncommander creature with mana value 3 or less. diff --git a/forge-gui/res/cardsfolder/t/the_peregrine_dynamo.txt b/forge-gui/res/cardsfolder/t/the_peregrine_dynamo.txt index 02c028d48cf..64dc58512a9 100644 --- a/forge-gui/res/cardsfolder/t/the_peregrine_dynamo.txt +++ b/forge-gui/res/cardsfolder/t/the_peregrine_dynamo.txt @@ -3,7 +3,7 @@ ManaCost:3 Types:Legendary Artifact Creature Construct PT:1/5 K:Haste -A:AB$ CopySpellAbility | Cost$ 1 T | TargetType$ Activated.YouCtrl,Triggered.YouCtrl | ValidTgts$ Card.Legendary+Other+IsNotCommander+YouCtrl | TgtPrompt$ Choose target triggered ability you control | MayChooseTarget$ True | SpellDescription$ Copy target activated or triggered ability you control from another legendary source that's not a commander. You may choose new targets for the copy. +A:AB$ CopySpellAbility | Cost$ 1 T | TargetType$ Activated.YouCtrl,Triggered.YouCtrl | ValidTgts$ Card.Legendary+Other+!IsCommander+YouCtrl | TgtPrompt$ Choose target triggered ability you control | MayChooseTarget$ True | SpellDescription$ Copy target activated or triggered ability you control from another legendary source that's not a commander. You may choose new targets for the copy. SVar:BuffedBy:Legendary DeckNeeds:Type$Legendary Oracle:Haste\n{1}, {T}: Copy target activated or triggered ability you control from another legendary source that's not a commander. You may choose new targets for the copy. (Mana abilities can't be targeted.) diff --git a/forge-gui/res/cardsfolder/y/you_will_know_true_suffering.txt b/forge-gui/res/cardsfolder/y/you_will_know_true_suffering.txt index 86d37db2ede..b1ddfbfcb96 100644 --- a/forge-gui/res/cardsfolder/y/you_will_know_true_suffering.txt +++ b/forge-gui/res/cardsfolder/y/you_will_know_true_suffering.txt @@ -2,6 +2,6 @@ Name:You Will Know True Suffering ManaCost:no cost Types:Scheme T:Mode$ SetInMotion | ValidCard$ Card.Self | Execute$ TrigDamageAll | TriggerZones$ Command | TriggerDescription$ When you set this scheme in motion, it deals damage equal to your commander's mana value to each noncommander creature your opponents control. -SVar:TrigDamageAll:DB$ DamageAll | ValidCards$ Creature.IsNotCommander+OppCtrl | ValidDescription$ each noncommander creature your opponents control. | NumDmg$ X +SVar:TrigDamageAll:DB$ DamageAll | ValidCards$ Creature.!IsCommander+OppCtrl | ValidDescription$ each noncommander creature your opponents control. | NumDmg$ X SVar:X:Count$ValidAll Card.IsCommander+YouOwn$SumCMC Oracle:When you set this scheme in motion, it deals damage equal to your commander's mana value to each noncommander creature your opponents control. diff --git a/forge-gui/src/main/java/forge/gui/card/CardScriptParser.java b/forge-gui/src/main/java/forge/gui/card/CardScriptParser.java index c24b0b178f5..76068096514 100644 --- a/forge-gui/src/main/java/forge/gui/card/CardScriptParser.java +++ b/forge-gui/src/main/java/forge/gui/card/CardScriptParser.java @@ -486,7 +486,7 @@ public final class CardScriptParser { "hasActivatedAbility", "hasManaAbility", "hasNonManaActivatedAbility", "NoAbilities", "HasCounters", "wasNotCast", "ChosenType", "IsNotChosenType", "IsCommander", - "IsNotCommander", "IsRenowned"); + "IsRenowned"); private static final Set VALID_EXCLUSIVE_STARTSWITH = ImmutableSortedSet .of("named", "notnamed", "OwnedBy", "ControlledBy", "ControllerControls", "AttachedTo", "EnchantedBy",