From 6f9cb7c74d23ba903d12ee0e610b8a8ad61b3f7f Mon Sep 17 00:00:00 2001 From: tool4ever Date: Thu, 10 Oct 2024 08:34:41 +0200 Subject: [PATCH] Fix Summary Dismissal (#6263) --- .../src/main/java/forge/game/ability/AbilityUtils.java | 2 +- .../a/ajani_nacatl_pariah_ajani_nacatl_avenger.txt | 5 +++-- forge-gui/res/cardsfolder/c/cryptex.txt | 2 +- forge-gui/res/cardsfolder/d/disappear.txt | 2 +- forge-gui/res/cardsfolder/k/keldon_firebombers.txt | 2 +- forge-gui/res/cardsfolder/r/ruhan_of_the_fomori.txt | 2 +- forge-gui/res/cardsfolder/t/the_five_doctors.txt | 2 +- forge-gui/res/cardsfolder/t/twist_allegiance.txt | 2 +- forge-gui/res/cardsfolder/upcoming/i_am_never_alone.txt | 2 +- 9 files changed, 11 insertions(+), 10 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java index 64f3894e67b..4336da4c160 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -1296,7 +1296,7 @@ public class AbilityUtils { } } } else if (defined.startsWith("ValidStack")) { - String valid = changedDef.split(" ", 2)[1]; + String[] valid = changedDef.split(" ", 2)[1].split(","); for (SpellAbilityStackInstance stackInstance : game.getStack()) { SpellAbility instanceSA = stackInstance.getSpellAbility(); if (instanceSA != null && instanceSA.isValid(valid, player, card, sa)) { diff --git a/forge-gui/res/cardsfolder/a/ajani_nacatl_pariah_ajani_nacatl_avenger.txt b/forge-gui/res/cardsfolder/a/ajani_nacatl_pariah_ajani_nacatl_avenger.txt index aa92355bb34..adfb30c3f67 100644 --- a/forge-gui/res/cardsfolder/a/ajani_nacatl_pariah_ajani_nacatl_avenger.txt +++ b/forge-gui/res/cardsfolder/a/ajani_nacatl_pariah_ajani_nacatl_avenger.txt @@ -21,10 +21,11 @@ Types:Legendary Planeswalker Ajani Loyalty:3 A:AB$ PutCounterAll | Cost$ AddCounter<2/LOYALTY> | ValidCards$ Cat.YouCtrl | CounterType$ P1P1 | CounterNum$ 1 | Planeswalker$ True | SpellDescription$ Put a +1/+1 counter on each Cat you control. A:AB$ Token | Cost$ AddCounter<0/LOYALTY> | TokenAmount$ 1 | TokenScript$ w_2_1_cat_warrior | TokenOwner$ You | RememberOriginalTokens$ True | SubAbility$ DBImmediateTrig1 | Planeswalker$ True | SpellDescription$ Create a 2/1 white Cat Warrior creature token. When you do, if you control a red permanent other than CARDNAME, he deals damage equal to the number of creatures you control to any target. -SVar:DBImmediateTrig1:DB$ ImmediateTrigger | TriggerAmount$ Remembered$Amount | ConditionPresent$ Permanent.Red+YouCtrl+Other | Execute$ TrigDamage | TriggerDescription$ When you do, if you control a red permanent other than CARDNAME, he deals damage equal to the number of creatures you control to any target. -SVar:TrigDamage:DB$ DealDamage | NumDmg$ X | ValidTgts$ Any | ConditionPresent$ Permanent.Red+YouCtrl+Other | SubAbility$ DBCleanup | TgtPrompt$ Select any valid target | SpellDescription$ CARDNAME deals damage equal to the number of creatures you control to any target. +SVar:DBImmediateTrig1:DB$ ImmediateTrigger | TriggerAmount$ Remembered$Amount | ConditionPresent$ Permanent.Red+YouCtrl+Other | Execute$ TrigDamage | SubAbility$ DBCleanup2 | TriggerDescription$ When you do, if you control a red permanent other than CARDNAME, he deals damage equal to the number of creatures you control to any target. +SVar:TrigDamage:DB$ DealDamage | NumDmg$ X | ValidTgts$ Any | ConditionPresent$ Permanent.Red+YouCtrl+Other | TgtPrompt$ Select any valid target | SpellDescription$ CARDNAME deals damage equal to the number of creatures you control to any target. SVar:X:Count$Valid Creature.YouCtrl A:AB$ ChooseCard | Cost$ SubCounter<4/LOYALTY> | Planeswalker$ True | Ultimate$ True | Defined$ Opponent | Choices$ Permanent.nonLand | ChooseEach$ Artifact & Creature & Enchantment & Planeswalker | ControlledByPlayer$ Chooser | Mandatory$ True | Reveal$ True | SubAbility$ SacAllOthers | StackDescription$ SpellDescription | SpellDescription$ Each opponent chooses an artifact, a creature, an enchantment, and a planeswalker from among the nonland permanents they control, then sacrifices the rest. SVar:SacAllOthers:DB$ SacrificeAll | ValidCards$ Permanent.nonLand+OppCtrl+nonChosenCard | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True +SVar:DBCleanup2:DB$ Cleanup | ClearRemembered$ True Oracle:[+2]: Put a +1/+1 counter on each Cat you control.\n[0]: Create a 2/1 white Cat Warrior creature token. When you do, if you control a red permanent other than Ajani, Nacatl Avenger, he deals damage equal to the number of creatures you control to any target.\n[-4]: Each opponent chooses an artifact, a creature, an enchantment and a planeswalker from among the nonland permanents they control, then sacrifices the rest. diff --git a/forge-gui/res/cardsfolder/c/cryptex.txt b/forge-gui/res/cardsfolder/c/cryptex.txt index 8877f77d147..e4721174905 100644 --- a/forge-gui/res/cardsfolder/c/cryptex.txt +++ b/forge-gui/res/cardsfolder/c/cryptex.txt @@ -4,7 +4,7 @@ Types:Artifact A:AB$ Mana | Cost$ T CollectEvidence<3> | Produced$ Any | SubAbility$ DBPutCounter | SpellDescription$ Add one mana of any color. Put an unlock counter on CARDNAME. (To collect evidence 3, exile cards with total mana value 3 or greater from your graveyard.) SVar:DBPutCounter:DB$ PutCounter | Defined$ Self | CounterType$ UNLOCK A:AB$ Surveil | Cost$ Sac<1/CARDNAME> | Amount$ 3 | SubAbility$ DBDraw | IsPresent$ Card.Self+counters_GE5_UNLOCK | SpellDescription$ Surveil 3, then draw three cards. Activate only if CARDNAME has five or more unlock counters on it. -SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 3 | SubAbility$ DBGainLife +SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 3 DeckHints:Ability$Graveyard|Mill|Discard|Dredge DeckHas:Ability$Counters|Sacrifice|Surveil Oracle:{T}, Collect evidence 3: Add one mana of any color. Put an unlock counter on Cryptex. (To collect evidence 3, exile cards with total mana value 3 or greater from your graveyard.)\nSacrifice Cryptex: Surveil 3, then draw three cards. Activate only if Cryptex has five or more unlock counters on it. diff --git a/forge-gui/res/cardsfolder/d/disappear.txt b/forge-gui/res/cardsfolder/d/disappear.txt index 970cb058ad0..a7c55de7b24 100644 --- a/forge-gui/res/cardsfolder/d/disappear.txt +++ b/forge-gui/res/cardsfolder/d/disappear.txt @@ -3,6 +3,6 @@ ManaCost:2 U U Types:Enchantment Aura K:Enchant creature A:SP$ Attach | Cost$ 2 U U | ValidTgts$ Creature | AILogic$ Curse -A:AB$ ChangeZone | Cost$ U | Defined$ EnchantedAndSelf | Origin$ Battlefield | Destination$ Hand | SubAbility$ DBBounce | SpellDescription$ Return enchanted creature and CARDNAME to their owners' hands. +A:AB$ ChangeZone | Cost$ U | Defined$ EnchantedAndSelf | Origin$ Battlefield | Destination$ Hand | SpellDescription$ Return enchanted creature and CARDNAME to their owners' hands. SVar:NonStackingAttachEffect:True Oracle:Enchant creature\n{U}: Return enchanted creature and Disappear to their owners' hands. diff --git a/forge-gui/res/cardsfolder/k/keldon_firebombers.txt b/forge-gui/res/cardsfolder/k/keldon_firebombers.txt index f390aa28f7a..65386a1582d 100644 --- a/forge-gui/res/cardsfolder/k/keldon_firebombers.txt +++ b/forge-gui/res/cardsfolder/k/keldon_firebombers.txt @@ -4,7 +4,7 @@ Types:Creature Human Soldier PT:3/3 T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChooseThree | TriggerDescription$ When CARDNAME enters, each player sacrifices all lands they control except for three. SVar:TrigChooseThree:DB$ ChooseCard | Defined$ Player | Choices$ Land | ControlledByPlayer$ Chooser | Amount$ 3 | ChoiceTitle$ Choose three lands to keep | Mandatory$ True | Reveal$ True | SubAbility$ SacAllOthers -SVar:DBSacrificeAll:DB$ SacrificeAll | ValidCards$ Land.nonChosenCard | SubAbility$ DBCleanup +SVar:DBAllOthers:DB$ SacrificeAll | ValidCards$ Land.nonChosenCard | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearChosenCard$ True DeckHas:Ability$Sacrifice Oracle:When Keldon Firebombers enters, each player sacrifices all lands they control except for three. diff --git a/forge-gui/res/cardsfolder/r/ruhan_of_the_fomori.txt b/forge-gui/res/cardsfolder/r/ruhan_of_the_fomori.txt index fcf4447c8dd..a432cbeef57 100644 --- a/forge-gui/res/cardsfolder/r/ruhan_of_the_fomori.txt +++ b/forge-gui/res/cardsfolder/r/ruhan_of_the_fomori.txt @@ -3,7 +3,7 @@ ManaCost:1 U R W Types:Legendary Creature Giant Warrior PT:7/7 T:Mode$ Phase | Phase$ BeginCombat | ValidPlayer$ You | Execute$ TrigChoose | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of combat on your turn, choose an opponent at random. CARDNAME attacks that player this combat if able. -SVar:TrigChoose:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | Random$ True | SubAbility$ DBPEffect +SVar:TrigChoose:DB$ ChoosePlayer | Defined$ You | Choices$ Player.Opponent | Random$ True | SubAbility$ DBEffect SVar:DBEffect:DB$ Effect | RememberObjects$ Self | ExileOnMoved$ Battlefield | StaticAbilities$ AttackChosen | Duration$ UntilEndOfCombat SVar:AttackChosen:Mode$ MustAttack | ValidCreature$ Card.IsRemembered | MustAttack$ ChosenPlayer | Description$ EFFECTSOURCE attacks that player this combat if able. Oracle:At the beginning of combat on your turn, choose an opponent at random. Ruhan of the Fomori attacks that player this combat if able. diff --git a/forge-gui/res/cardsfolder/t/the_five_doctors.txt b/forge-gui/res/cardsfolder/t/the_five_doctors.txt index 3087a2cbae4..c993937b27d 100644 --- a/forge-gui/res/cardsfolder/t/the_five_doctors.txt +++ b/forge-gui/res/cardsfolder/t/the_five_doctors.txt @@ -2,7 +2,7 @@ Name:The Five Doctors ManaCost:5 G Types:Sorcery K:Kicker:5 -A:SP$ ChangeZone | Origin$ Library | OriginAlternative$ Graveyard | Destination$ Hand | DestinationAlternative$ Battlefield | DestAltSVar$ MANDATORY Count$TimesKicked | ChangeType$ Doctor | ChangeNum$ 5 | SubAbility$ DBChangeZone | SpellDescription$ Search your library and/or graveyard for up to five Doctor cards, reveal them, and put them into your hand. If you search your library this way, shuffle. If this spell was kicked, put those cards onto the battlefield instead of putting them into your hand. +A:SP$ ChangeZone | Origin$ Library | OriginAlternative$ Graveyard | Destination$ Hand | DestinationAlternative$ Battlefield | DestAltSVar$ MANDATORY Count$TimesKicked | ChangeType$ Doctor | ChangeNum$ 5 | SpellDescription$ Search your library and/or graveyard for up to five Doctor cards, reveal them, and put them into your hand. If you search your library this way, shuffle. If this spell was kicked, put those cards onto the battlefield instead of putting them into your hand. DeckNeeds:Type$Doctor DeckHas:Ability$Graveyard Oracle:Kicker {5} (You may pay an additional {5} as you cast this spell.)\nSearch your library and/or graveyard for up to five Doctor cards, reveal them, and put them into your hand. If you search your library this way, shuffle. If this spell was kicked, put those cards onto the battlefield instead of putting them into your hand. diff --git a/forge-gui/res/cardsfolder/t/twist_allegiance.txt b/forge-gui/res/cardsfolder/t/twist_allegiance.txt index d00a897aa40..2a0ea092b00 100644 --- a/forge-gui/res/cardsfolder/t/twist_allegiance.txt +++ b/forge-gui/res/cardsfolder/t/twist_allegiance.txt @@ -3,7 +3,7 @@ ManaCost:6 R Types:Sorcery A:SP$ GainControl | ValidTgts$ Opponent | AllValid$ Creature.TargetedPlayerCtrl | NewController$ You | LoseControl$ EOT | RememberControlled$ True | StackDescription$ REP You_{p:You} & target opponent_{p:Targeted} | SubAbility$ DBGainCtrlOpp | SpellDescription$ You and target opponent each gain control of all creatures the other controls until end of turn. Untap those creatures. Those creatures gain haste until end of turn. SVar:DBGainCtrlOpp:DB$ GainControl | AllValid$ Creature.IsNotRemembered+YouCtrl | NewController$ Targeted | LoseControl$ EOT | RememberControlled$ True | StackDescription$ None | SubAbility$ DBUntapAll -SVar:DBDUntapAll:DB$ UntapAll | ValidCards$ Creature.IsRemembered | SubAbility$ DBPumpAll +SVar:DBUntapAll:DB$ UntapAll | ValidCards$ Creature.IsRemembered | SubAbility$ DBPumpAll SVar:PumpAll:DB$ PumpAll | ValidCards$ Creature.IsRemembered | KW$ Haste | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True AI:RemoveDeck:All diff --git a/forge-gui/res/cardsfolder/upcoming/i_am_never_alone.txt b/forge-gui/res/cardsfolder/upcoming/i_am_never_alone.txt index b437d994887..d63e9f57cdc 100644 --- a/forge-gui/res/cardsfolder/upcoming/i_am_never_alone.txt +++ b/forge-gui/res/cardsfolder/upcoming/i_am_never_alone.txt @@ -3,4 +3,4 @@ ManaCost:no cost Types:Scheme T:Mode$ SetInMotion | ValidCard$ Card.Self | Execute$ DBCopyCommander | TriggerZones$ Command | TriggerDescription$ When you set this scheme in motion, create a token that's a copy of your commander, except it's not legendary. SVar:DBCopyCommander:DB$ CopyPermanent | Choices$ Card.IsCommander+YouOwn | Defined$ ValidAll Card.IsCommander+YouOwn | ChoiceTitle$ Choose a commander you own | NonLegendary$ True -Oracle:When you set this scheme in motion, create a token that's a copy of your commander, except it's not legendary.\n"This is but a pale shadow of my true form. Cower before it, and despair." +Oracle:When you set this scheme in motion, create a token that's a copy of your commander, except it's not legendary.