From 8ffdf02cb7a2df4eaf0e5604e2d7f98f51e922d8 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Sat, 28 May 2022 19:10:38 -0500 Subject: [PATCH 01/25] CBL: Brainstealer Dragon, Giant Ankheg + 4 cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CBL: Scripts for six CBL cards — - Amethyst Dragon // Explosive Crystal - Ancient Copper Dragon - Black Market Connections - Brainstealer Dragon - Giant Ankheg - Zhentarim Bandit --- .../amethyst_dragon_explosive_crystal.txt | 16 ++++++++++++++++ .../upcoming/ancient_copper_dragon.txt | 10 ++++++++++ .../upcoming/black_market_connections.txt | 12 ++++++++++++ .../cardsfolder/upcoming/brainstealer_dragon.txt | 16 ++++++++++++++++ .../res/cardsfolder/upcoming/giant_ankheg.txt | 9 +++++++++ .../cardsfolder/upcoming/zhentarim_bandit.txt | 9 +++++++++ 6 files changed, 72 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/amethyst_dragon_explosive_crystal.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/black_market_connections.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/giant_ankheg.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt diff --git a/forge-gui/res/cardsfolder/upcoming/amethyst_dragon_explosive_crystal.txt b/forge-gui/res/cardsfolder/upcoming/amethyst_dragon_explosive_crystal.txt new file mode 100644 index 00000000000..64c9ffe760c --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/amethyst_dragon_explosive_crystal.txt @@ -0,0 +1,16 @@ +Name:Amethyst Dragon +ManaCost:4 R R +Types:Creature Dragon +PT:4/4 +K:Flying +K:Haste +AlternateMode:Adventure +Oracle:Flying, haste + +ALTERNATE + +Name:Explosive Crystal +ManaCost:4 R +Types:Sorcery Adventure +A:SP$ DealDamage | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Select any target to distribute damage to | NumDmg$ 4 | TargetMin$ 1 | TargetMax$ 4 | DividedAsYouChoose$ 4 | SpellDescription$ CARDNAME deals 4 damage divided as you choose among any number of targets. +Oracle:Explosive Crystal deals 4 damage divided as you choose among any number of targets. diff --git a/forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt b/forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt new file mode 100644 index 00000000000..4b13f19c604 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt @@ -0,0 +1,10 @@ +Name:Ancient Copper Dragon +ManaCost:4 R R +Types:Creature Elder Dragon +PT:6/5 +K:Flying +T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigRoll | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, roll a d20. You create a number of Treasure tokens equal to the result. +SVar:TrigRoll:DB$ RollDice | ResultSVar$ Result | Sides$ 20 | SubAbility$ DBToken +SVar:DBToken:DB$ Token | TokenScript$ c_a_treasure_sac | TokenAmount$ Result +DeckHas:Type$Artifact|Treasure +Oracle:Flying\nWhenever Ancient Copper Dragon deals combat damage to a player, roll a d20. You create a number of Treasure tokens equal to the result. diff --git a/forge-gui/res/cardsfolder/upcoming/black_market_connections.txt b/forge-gui/res/cardsfolder/upcoming/black_market_connections.txt new file mode 100644 index 00000000000..2c08b603300 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/black_market_connections.txt @@ -0,0 +1,12 @@ +Name:Black Market Connections +ManaCost:2 B +Types:Enchantment +T:Mode$ Phase | PreCombatMain$ True | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigCharm | TriggerDescription$ At the beginning of your precombat main phase, ABILITY +SVar:TrigCharm:DB$ Charm | Choices$ DBTreasureLose1,DBDrawLose2,DBTokenLose3 | MinCharmNum$ 1 | CharmNum$ 3 +SVar:DBTreasureLose1:DB$ Token | TokenScript$ c_a_treasure_sac | SubAbility$ DBLoseLife1 | SpellDescription$ Sell Contraband — Create a Treasure token. You lose 1 life. +SVar:DBDrawLose2:DB$ Draw | NumCards$ 1 | SubAbility$ DBLoseLife2 | SpellDescription$ Buy Information — Draw a card. You lose 2 life. +SVar:DBTokenLose3:DB$ Token | TokenScript$ c_3_2_shapeshifter_changeling | SubAbility$ DBLoseLife3 | SpellDescription$ Hire a Mercenary — Create a 3/2 colorless Shapeshifter creature token with changeling. You lose 3 life. +SVar:DBLoseLife1:DB$ LoseLife | LifeAmount$ 1 | Defined$ You +SVar:DBLoseLife2:DB$ LoseLife | LifeAmount$ 2 | Defined$ You +SVar:DBLoseLife3:DB$ LoseLife | LifeAmount$ 3 | Defined$ You +Oracle:At the beginning of your precombat main phase, choose one or more —\n• Sell Contraband — Create a Treasure token. You lose 1 life.\n• Buy Information — Draw a card. You lose 2 life.\n• Hire a Mercenary — Create a 3/2 colorless Shapeshifter creature token with changeling. You lose 3 life. diff --git a/forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt b/forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt new file mode 100644 index 00000000000..40033311c57 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt @@ -0,0 +1,16 @@ +Name:Brainstealer Dragon +ManaCost:5 B B +Types:Creature Dragon Horror +PT:6/6 +K:Flying +T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigExile | TriggerDescription$ At the beginning of your end step, exile the top card of each opponent's library. You may play those cards for as long as they remain exiled. If you cast a spell this way, you may spend mana as though it were mana of any color to cast it. +SVar:TrigExile:DB$ Mill | Defined$ Player.Opponent | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | Triggers$ TrigCleanup | ForgetOnMoved$ Exile | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:STPlay:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | MayPlayIgnoreColor$ True | Description$ You may play those cards for as long as they remain exiled, and you may spend mana as though it were mana of any color to cast them. +SVar:TrigCleanup:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | TriggerZones$ Command | Execute$ DBExileSelf | Static$ True +SVar:DBExileSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Permanent.OppOwn+YouCtrl+nonLand | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever a nonland permanent an opponent owns enters the battlefield under your control, they lose life equal to its mana value. +SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredCardOwner | LifeAmount$ X +SVar:X:TriggeredCard$CardManaCost +Oracle:Flying\nAt the beginning of your end step, exile the top card of each opponent's library. You may play those cards for as long as they remain exiled. If you cast a spell this way, you may spend mana as though it were mana of any color to cast it.\nWhenever a nonland permanent an opponent owns enters the battlefield under your control, they lose life equal to its mana value. diff --git a/forge-gui/res/cardsfolder/upcoming/giant_ankheg.txt b/forge-gui/res/cardsfolder/upcoming/giant_ankheg.txt new file mode 100644 index 00000000000..c5173d82207 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/giant_ankheg.txt @@ -0,0 +1,9 @@ +Name:Giant Ankheg +ManaCost:6 G G +Types:Creature Insect +PT:8/8 +K:Trample +K:Ward:2 +S:Mode$ Continuous | Affected$ Creature.Other+YouCtrl | AddKeyword$ Trample & Ward:2 | Description$ Other creatures you control have trample and ward {2}. +SVar:PlayMain1:TRUE +Oracle:Trample\nWard {2} (Whenever this creature becomes the target of a spell or ability an opponent controls, counter it unless that player pays {2}.)\nOther creatures you control have trample and ward {2}. diff --git a/forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt b/forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt new file mode 100644 index 00000000000..e7140c2f665 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt @@ -0,0 +1,9 @@ +Name:Zhentarim Bandit +ManaCost:1 B +Types:Creature Halfling Rogue +PT:2/1 +T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME attacks, you may pay 1 life. If you do, create a Treasure token. +SVar:TrigToken:AB$ Token | Cost$ PayLife<1> | TokenScript$ c_a_treasure_sac +SVar:HasAttackEffect:TRUE +DeckHas:Type$Artifact|Treasure +Oracle:Whenever Zhentarim Bandit attacks, you may pay 1 life. If you do, create a Treasure token. From b830a82e916834469cd25bcec62389db2bc8f0dc Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Sun, 29 May 2022 15:21:47 -0500 Subject: [PATCH 02/25] Update ancient_copper_dragon.txt --- forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt b/forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt index 4b13f19c604..b5274890b80 100644 --- a/forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt +++ b/forge-gui/res/cardsfolder/upcoming/ancient_copper_dragon.txt @@ -6,5 +6,5 @@ K:Flying T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigRoll | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, roll a d20. You create a number of Treasure tokens equal to the result. SVar:TrigRoll:DB$ RollDice | ResultSVar$ Result | Sides$ 20 | SubAbility$ DBToken SVar:DBToken:DB$ Token | TokenScript$ c_a_treasure_sac | TokenAmount$ Result -DeckHas:Type$Artifact|Treasure +DeckHas:Type$Artifact|Treasure & Ability$Sacrifice|Token Oracle:Flying\nWhenever Ancient Copper Dragon deals combat damage to a player, roll a d20. You create a number of Treasure tokens equal to the result. From d3287a7c87d48a51b26b545a4348cd96fc2fb244 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Sun, 29 May 2022 15:22:28 -0500 Subject: [PATCH 03/25] Update black_market_connections.txt --- forge-gui/res/cardsfolder/upcoming/black_market_connections.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/res/cardsfolder/upcoming/black_market_connections.txt b/forge-gui/res/cardsfolder/upcoming/black_market_connections.txt index 2c08b603300..7818c16e98f 100644 --- a/forge-gui/res/cardsfolder/upcoming/black_market_connections.txt +++ b/forge-gui/res/cardsfolder/upcoming/black_market_connections.txt @@ -9,4 +9,5 @@ SVar:DBTokenLose3:DB$ Token | TokenScript$ c_3_2_shapeshifter_changeling | SubAb SVar:DBLoseLife1:DB$ LoseLife | LifeAmount$ 1 | Defined$ You SVar:DBLoseLife2:DB$ LoseLife | LifeAmount$ 2 | Defined$ You SVar:DBLoseLife3:DB$ LoseLife | LifeAmount$ 3 | Defined$ You +DeckHas:Ability$Token|Sacrifice & Type$Artifact|Treasure|Shapeshifter Oracle:At the beginning of your precombat main phase, choose one or more —\n• Sell Contraband — Create a Treasure token. You lose 1 life.\n• Buy Information — Draw a card. You lose 2 life.\n• Hire a Mercenary — Create a 3/2 colorless Shapeshifter creature token with changeling. You lose 3 life. From c14b6316ab8572acd5d52b692c41c81c55f6c481 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Sun, 29 May 2022 15:27:46 -0500 Subject: [PATCH 04/25] CLB: Black Market Connections token script Add missing c_3_2_shapeshifter_changeling token script for CLB card Black Market Connections --- .../res/tokenscripts/c_3_2_shapeshifter_changeling.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt diff --git a/forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt b/forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt new file mode 100644 index 00000000000..f419b80d9bc --- /dev/null +++ b/forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt @@ -0,0 +1,6 @@ +Name:Shapeshifter +ManaCost:no cost +Types:Creature Shapeshifter +PT:3/2 +K:Changeling +Oracle:Changeling (This token is every creature type.) From 9ab9267fdeb14956946adb55dd0fef3212cdf15b Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Sun, 29 May 2022 15:57:15 -0500 Subject: [PATCH 05/25] Update brainstealer_dragon.txt --- forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt b/forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt index 40033311c57..fab69a2e134 100644 --- a/forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt +++ b/forge-gui/res/cardsfolder/upcoming/brainstealer_dragon.txt @@ -4,12 +4,10 @@ Types:Creature Dragon Horror PT:6/6 K:Flying T:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigExile | TriggerDescription$ At the beginning of your end step, exile the top card of each opponent's library. You may play those cards for as long as they remain exiled. If you cast a spell this way, you may spend mana as though it were mana of any color to cast it. -SVar:TrigExile:DB$ Mill | Defined$ Player.Opponent | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBEffect -SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | Triggers$ TrigCleanup | ForgetOnMoved$ Exile | SubAbility$ DBCleanup +SVar:TrigExile:DB$ Dig | Defined$ Player.Opponent | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | StaticAbilities$ STPlay | Duration$ Permanent | ForgetOnMoved$ Exile | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:STPlay:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | MayPlayIgnoreColor$ True | Description$ You may play those cards for as long as they remain exiled, and you may spend mana as though it were mana of any color to cast them. -SVar:TrigCleanup:Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Exile | Destination$ Any | TriggerZones$ Command | Execute$ DBExileSelf | Static$ True -SVar:DBExileSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Permanent.OppOwn+YouCtrl+nonLand | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ Whenever a nonland permanent an opponent owns enters the battlefield under your control, they lose life equal to its mana value. SVar:TrigLoseLife:DB$ LoseLife | Defined$ TriggeredCardOwner | LifeAmount$ X SVar:X:TriggeredCard$CardManaCost From f53fb61d3d6da1378f4206340aea1480a914a427 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Sun, 29 May 2022 16:00:22 -0500 Subject: [PATCH 06/25] Update zhentarim_bandit.txt --- forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt b/forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt index e7140c2f665..252a9312697 100644 --- a/forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt +++ b/forge-gui/res/cardsfolder/upcoming/zhentarim_bandit.txt @@ -5,5 +5,5 @@ PT:2/1 T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME attacks, you may pay 1 life. If you do, create a Treasure token. SVar:TrigToken:AB$ Token | Cost$ PayLife<1> | TokenScript$ c_a_treasure_sac SVar:HasAttackEffect:TRUE -DeckHas:Type$Artifact|Treasure +DeckHas:Type$Artifact|Treasure & Ability$Token|Sacrifice Oracle:Whenever Zhentarim Bandit attacks, you may pay 1 life. If you do, create a Treasure token. From cb0caf34cdaf015cb3e5b9f298bd79af9d8dc756 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Sun, 29 May 2022 21:35:52 -0500 Subject: [PATCH 07/25] Update c_3_2_shapeshifter_changeling.txt --- forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt b/forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt index f419b80d9bc..1d60481c57e 100644 --- a/forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt +++ b/forge-gui/res/tokenscripts/c_3_2_shapeshifter_changeling.txt @@ -1,4 +1,4 @@ -Name:Shapeshifter +Name:Shapeshifter Token ManaCost:no cost Types:Creature Shapeshifter PT:3/2 From a6778bbae23622bdea24cfc224d2b4b24ee7eeb9 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 12:13:52 -0500 Subject: [PATCH 08/25] CLB: Cadira, Caller of the Small + 4 cards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CLB: Contains scripts for five CBL cards + 1 token script — - Archivist of Oghma - Ascend from Avernus - Astarion's Thirst - Baldur's Gate - Cadira, Caller of the Small - Token: 1/1 white Rabbit creature --- .../res/cardsfolder/upcoming/archivist_of_oghma.txt | 9 +++++++++ .../res/cardsfolder/upcoming/ascend_from_avernus.txt | 8 ++++++++ .../res/cardsfolder/upcoming/astarions_thirst.txt | 8 ++++++++ forge-gui/res/cardsfolder/upcoming/baldurs_gate.txt | 8 ++++++++ .../upcoming/cadira_caller_of_the_small.txt | 10 ++++++++++ forge-gui/res/tokenscripts/w_1_1_rabbit.txt | 6 ++++++ 6 files changed, 49 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/baldurs_gate.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/cadira_caller_of_the_small.txt create mode 100644 forge-gui/res/tokenscripts/w_1_1_rabbit.txt diff --git a/forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt b/forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt new file mode 100644 index 00000000000..6b4b6456b77 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt @@ -0,0 +1,9 @@ +Name:Archivist of Oghma +ManaCost:1 W +Types:Creature Halfling Cleric +PT:2/2 +K:Flash +T:Mode$ SearchedLibrary | ValidPlayer$ Player.Opponent | SearchOwnLibrary$ True | Execute$ TrigGainLife | TriggerZones$ Battlefield | TriggerDescription$ Whenever an opponent searches their library, you gain 1 life and draw a card. +SVar:TrigGainLife:DB$ GainLife | LifeAmount$ 1 | SubAbility$ DBDraw +SVar:DBDraw:DB$ Draw +Oracle:Flash\nWhenever an opponent searches their library, you gain 1 life and draw a card. diff --git a/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt b/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt new file mode 100644 index 00000000000..a07bd4c823e --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt @@ -0,0 +1,8 @@ +Name:Ascend from Avernus +ManaCost:X W W W +Types:Sorcery +A:SP$ ChangeZoneAll | Origin$ Graveyard | Destination$ Battlefield | ChangeType$ Creature.YouOwn+cmcLEX,Planeswalker.YouOwn+cmcLEX | SubAbility$ DBChange | SpellDescription$ Return all creature and planeswalker cards with mana value X or less from your graveyard to the battlefield. Exile CARDNAME. +SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile +SVar:X:Count$xPaid +DeckHas:Ability$Graveyard +Oracle:Return all creature and planeswalker cards with mana value X or less from your graveyard to the battlefield. Exile Ascend from Avernus. diff --git a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt new file mode 100644 index 00000000000..9e68adc678e --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt @@ -0,0 +1,8 @@ +Name:Astarion's Thirst +ManaCost:3 B +Types:Instant +A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBPutCounter | SpellDescription$ Exile target creature. Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. +SVar:DBPutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl+IsCommander | CounterType$ P1P1 | CounterNum$ X | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +SVar:X:RememberedLKI$CardPower +Oracle:Exile target creature. Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. diff --git a/forge-gui/res/cardsfolder/upcoming/baldurs_gate.txt b/forge-gui/res/cardsfolder/upcoming/baldurs_gate.txt new file mode 100644 index 00000000000..96e318c971c --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/baldurs_gate.txt @@ -0,0 +1,8 @@ +Name:Baldur's Gate +ManaCost:no cost +Types:Legendary Land Gate +A:AB$ Mana | Cost$ T | Produced$ C | Amount$ 1 | SpellDescription$ Add {C}. +A:AB$ Mana | Cost$ 2 T | Produced$ Any | Amount$ X | SpellDescription$ Add X mana of any one color, where X is the number of other Gates you control. +SVar:X:Count$Valid Gate.YouCtrl+Other +DeckHints:Type$Gate +Oracle:{T}: Add {C}.\n{2}, {T}: Add X mana of any one color, where X is the number of other Gates you control. diff --git a/forge-gui/res/cardsfolder/upcoming/cadira_caller_of_the_small.txt b/forge-gui/res/cardsfolder/upcoming/cadira_caller_of_the_small.txt new file mode 100644 index 00000000000..4ae1c7bd742 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/cadira_caller_of_the_small.txt @@ -0,0 +1,10 @@ +Name:Cadira, Caller of the Small +ManaCost:1 G W +Types:Legendary Creature Orc Ranger +PT:3/3 +K:Trample +T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, for each token you control, create a 1/1 white Rabbit creature token. +SVar:TrigToken:DB$ Token | TokenScript$ w_1_1_rabbit | TokenOwner$ You | TokenAmount$ X +SVar:X:Count$Valid Permanent.token+YouCtrl +DeckHas:Ability$Token +Oracle:Trample\nWhenever Cadira, Caller of the Small deals combat damage to a player, for each token you control, create a 1/1 white Rabbit creature token. diff --git a/forge-gui/res/tokenscripts/w_1_1_rabbit.txt b/forge-gui/res/tokenscripts/w_1_1_rabbit.txt new file mode 100644 index 00000000000..93f806dfdbb --- /dev/null +++ b/forge-gui/res/tokenscripts/w_1_1_rabbit.txt @@ -0,0 +1,6 @@ +Name:Rabbit Token +ManaCost:no cost +Types:Creature Rabbit +Colors:white +PT:1/1 +Oracle: From e8511db24ea053682a94647ef836cece1fe3a0b8 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 16:01:03 -0500 Subject: [PATCH 09/25] Update archivist_of_oghma.txt --- forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt b/forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt index 6b4b6456b77..937a813c2a0 100644 --- a/forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt +++ b/forge-gui/res/cardsfolder/upcoming/archivist_of_oghma.txt @@ -6,4 +6,5 @@ K:Flash T:Mode$ SearchedLibrary | ValidPlayer$ Player.Opponent | SearchOwnLibrary$ True | Execute$ TrigGainLife | TriggerZones$ Battlefield | TriggerDescription$ Whenever an opponent searches their library, you gain 1 life and draw a card. SVar:TrigGainLife:DB$ GainLife | LifeAmount$ 1 | SubAbility$ DBDraw SVar:DBDraw:DB$ Draw +DeckHas:Ability$LifeGain Oracle:Flash\nWhenever an opponent searches their library, you gain 1 life and draw a card. From 19b0137a861747c4fe1af3c487154340008b2703 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 16:01:51 -0500 Subject: [PATCH 10/25] Update ascend_from_avernus.txt --- forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt b/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt index a07bd4c823e..8097d5e61a8 100644 --- a/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt +++ b/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt @@ -5,4 +5,5 @@ A:SP$ ChangeZoneAll | Origin$ Graveyard | Destination$ Battlefield | ChangeType$ SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile SVar:X:Count$xPaid DeckHas:Ability$Graveyard +DeckHints:Type$Planeswalker & Ability$Discard|Sacrifice Oracle:Return all creature and planeswalker cards with mana value X or less from your graveyard to the battlefield. Exile Ascend from Avernus. From 15ed877279b2c87af7d0940b1afb12911a5c91e4 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 16:02:17 -0500 Subject: [PATCH 11/25] Update astarions_thirst.txt --- forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt index 9e68adc678e..8d15d315129 100644 --- a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt +++ b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt @@ -5,4 +5,5 @@ A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Ori SVar:DBPutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl+IsCommander | CounterType$ P1P1 | CounterNum$ X | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:RememberedLKI$CardPower +DeckHas:Ability$Counters Oracle:Exile target creature. Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. From cacf854683488646290a8cefc4c8de61f250e484 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 16:05:25 -0500 Subject: [PATCH 12/25] Update cadira_caller_of_the_small.txt --- .../res/cardsfolder/upcoming/cadira_caller_of_the_small.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/upcoming/cadira_caller_of_the_small.txt b/forge-gui/res/cardsfolder/upcoming/cadira_caller_of_the_small.txt index 4ae1c7bd742..3dba54d0afd 100644 --- a/forge-gui/res/cardsfolder/upcoming/cadira_caller_of_the_small.txt +++ b/forge-gui/res/cardsfolder/upcoming/cadira_caller_of_the_small.txt @@ -6,5 +6,6 @@ K:Trample T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME deals combat damage to a player, for each token you control, create a 1/1 white Rabbit creature token. SVar:TrigToken:DB$ Token | TokenScript$ w_1_1_rabbit | TokenOwner$ You | TokenAmount$ X SVar:X:Count$Valid Permanent.token+YouCtrl -DeckHas:Ability$Token +DeckHas:Ability$Token & Type$Rabbit +DeckNeeds:Ability$Token Oracle:Trample\nWhenever Cadira, Caller of the Small deals combat damage to a player, for each token you control, create a 1/1 white Rabbit creature token. From f028da6b9fdd993ab3118a5adc88cd9f16bb581b Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 17:00:20 -0500 Subject: [PATCH 13/25] Update ascend_from_avernus.txt --- forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt b/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt index 8097d5e61a8..45e4e411236 100644 --- a/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt +++ b/forge-gui/res/cardsfolder/upcoming/ascend_from_avernus.txt @@ -1,8 +1,8 @@ Name:Ascend from Avernus ManaCost:X W W W Types:Sorcery -A:SP$ ChangeZoneAll | Origin$ Graveyard | Destination$ Battlefield | ChangeType$ Creature.YouOwn+cmcLEX,Planeswalker.YouOwn+cmcLEX | SubAbility$ DBChange | SpellDescription$ Return all creature and planeswalker cards with mana value X or less from your graveyard to the battlefield. Exile CARDNAME. -SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile +A:SP$ ChangeZoneAll | Origin$ Graveyard | Destination$ Battlefield | ChangeType$ Creature.YouOwn+cmcLEX,Planeswalker.YouOwn+cmcLEX | SubAbility$ DBChange | SpellDescription$ Return all creature and planeswalker cards with mana value X or less from your graveyard to the battlefield. +SVar:DBChange:DB$ ChangeZone | Origin$ Stack | Destination$ Exile | SpellDescription$ Exile CARDNAME. SVar:X:Count$xPaid DeckHas:Ability$Graveyard DeckHints:Type$Planeswalker & Ability$Discard|Sacrifice From f1eea28c58167c2e178811c1051ea908d978395d Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 18:19:32 -0500 Subject: [PATCH 14/25] Update astarions_thirst.txt --- forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt index 8d15d315129..877c2a51098 100644 --- a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt +++ b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt @@ -1,9 +1,7 @@ Name:Astarion's Thirst ManaCost:3 B Types:Instant -A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | RememberChanged$ True | SubAbility$ DBPutCounter | SpellDescription$ Exile target creature. Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. -SVar:DBPutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl+IsCommander | CounterType$ P1P1 | CounterNum$ X | SubAbility$ DBCleanup -SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True -SVar:X:RememberedLKI$CardPower -DeckHas:Ability$Counters +A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBPutCounter | StackDescription$ Exile {c:Targeted}. | SpellDescription$ StackDescription +SVar:DBPutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl+IsCommander | CounterType$ P1P1 | CounterNum$ X | StackDescription$ Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. +SVar:X:TargetedLKI$CardPower Oracle:Exile target creature. Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. From d95dc9451b047d7ab0576d9cb2647159396c2c47 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 18:23:40 -0500 Subject: [PATCH 15/25] Update astarions_thirst.txt --- forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt index 877c2a51098..632daa49d3d 100644 --- a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt +++ b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt @@ -2,6 +2,6 @@ Name:Astarion's Thirst ManaCost:3 B Types:Instant A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBPutCounter | StackDescription$ Exile {c:Targeted}. | SpellDescription$ StackDescription -SVar:DBPutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl+IsCommander | CounterType$ P1P1 | CounterNum$ X | StackDescription$ Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. +SVar:DBPutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl+IsCommander | CounterType$ P1P1 | CounterNum$ X | StackDescription$ SpellDescription | SpellDescription$ Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. SVar:X:TargetedLKI$CardPower Oracle:Exile target creature. Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. From fb9a9065f147ba99b2b59d8da817845568e3e0d7 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Mon, 30 May 2022 19:28:45 -0500 Subject: [PATCH 16/25] Update astarions_thirst.txt --- forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt index 632daa49d3d..8651c905933 100644 --- a/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt +++ b/forge-gui/res/cardsfolder/upcoming/astarions_thirst.txt @@ -1,7 +1,7 @@ Name:Astarion's Thirst ManaCost:3 B Types:Instant -A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBPutCounter | StackDescription$ Exile {c:Targeted}. | SpellDescription$ StackDescription -SVar:DBPutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl+IsCommander | CounterType$ P1P1 | CounterNum$ X | StackDescription$ SpellDescription | SpellDescription$ Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. +A:SP$ ChangeZone | ValidTgts$ Creature | TgtPrompt$ Select target creature | Origin$ Battlefield | Destination$ Exile | SubAbility$ DBPutCounter | SpellDescription$ Exile target creature. Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. +SVar:DBPutCounter:DB$ PutCounter | Choices$ Creature.YouCtrl+IsCommander | CounterType$ P1P1 | CounterNum$ X | StackDescription$ Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. SVar:X:TargetedLKI$CardPower Oracle:Exile target creature. Put X +1/+1 counters on a commander creature you control, where X is the power of the creature exiled this way. From 718e8da96890f8f2ca32b6a09fc77e00e7853676 Mon Sep 17 00:00:00 2001 From: Suthro <81990938+Suthro@users.noreply.github.com> Date: Fri, 10 Jun 2022 23:56:02 -0500 Subject: [PATCH 17/25] CLB: Artificer Class CLB: Add script for card Artificer Class --- .../res/cardsfolder/upcoming/artificer_class.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/artificer_class.txt diff --git a/forge-gui/res/cardsfolder/upcoming/artificer_class.txt b/forge-gui/res/cardsfolder/upcoming/artificer_class.txt new file mode 100644 index 00000000000..bfcf861e8b0 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/artificer_class.txt @@ -0,0 +1,12 @@ +Name:Artificer Class +ManaCost:1 U +Types:Enchantment Class +S:Mode$ ReduceCost | EffectZone$ Battlefield | ValidCard$ Card.Artifact | Activator$ You | Type$ Spell | OnlyFirstSpell$ True | Amount$ 1 | Description$ The first artifact spell you cast each turn costs {1} less to cast. +K:Class:2:1 U:AddTrigger$ TriggerClassLevel +SVar:TriggerClassLevel:Mode$ ClassLevelGained | ClassLevel$ 2 | ValidCard$ Card.Self | TriggerZones$ Battlefield | Execute$ TrigDigUntil | Secondary$ True | TriggerDescription$ When this Class becomes level 2, reveal cards from the top of your library until you reveal an artifact card. Put that card into your hand and the rest on the bottom of your library in a random order. +SVar:TrigDigUntil:DB$ DigUntil | Valid$ Artifact | FoundDestination$ Hand | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | RevealRandomOrder$ True +K:Class:3:5 U:AddTrigger$ TriggerEndTurn +SVar:TriggerEndTurn:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ CopyArtifact | Secondary$ True | TriggerDescription$ At the beginning of your end step, create a token that's a copy of target artifact you control. +SVar:CopyArtifact:DB$ CopyPermanent | ValidTgts$ Artifact.YouCtrl | TgtPrompt$ Select target artifact you control to copy +DeckNeeds:Type$Artifact +Oracle:(Gain the next level as a sorcery to add its ability.)\nThe first artifact spell you cast each turn costs {1} less to cast.\n{1}{U}: Level 2\nWhen this Class becomes level 2, reveal cards from the top of your library until you reveal an artifact card. Put that card into your hand and the rest on the bottom of your library in a random order.\n{5}{U}: Level 3\nAt the beginning of your end step, create a token that's a copy of target artifact you control. From a19f90db50cb697a35035e9b808b7f64db1c074d Mon Sep 17 00:00:00 2001 From: tool4EvEr Date: Sat, 11 Jun 2022 14:01:54 +0200 Subject: [PATCH 18/25] Initiative fix --- forge-game/src/main/java/forge/game/player/Player.java | 2 +- .../forge/game/trigger/TriggerDamageDoneOnceByController.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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 658cf02a6bf..73cbf35e0db 100644 --- a/forge-game/src/main/java/forge/game/player/Player.java +++ b/forge-game/src/main/java/forge/game/player/Player.java @@ -3206,7 +3206,7 @@ public class Player extends GameEntity implements Comparable { final String damageTrig = "Mode$ DamageDoneOnceByController | ValidSource$ Player | ValidTarget$ You | " + "CombatDamage$ True | TriggerZones$ Command | TriggerDescription$ Whenever one or more " + "creatures a player controls deal combat damage to you, that player takes the initiative."; - final String damageEff = "DB$ TakeInitiative | Defined$ TriggeredAttackingPlayer"; + final String damageEff = "DB$ TakeInitiative | Defined$ TriggeredSource"; final Trigger damageTrigger = TriggerHandler.parseTrigger(damageTrig, initiativeEffect, true); diff --git a/forge-game/src/main/java/forge/game/trigger/TriggerDamageDoneOnceByController.java b/forge-game/src/main/java/forge/game/trigger/TriggerDamageDoneOnceByController.java index a96243d52aa..8d118146261 100644 --- a/forge-game/src/main/java/forge/game/trigger/TriggerDamageDoneOnceByController.java +++ b/forge-game/src/main/java/forge/game/trigger/TriggerDamageDoneOnceByController.java @@ -36,7 +36,6 @@ public class TriggerDamageDoneOnceByController extends Trigger { @Override public void setTriggeringObjects(SpellAbility sa, Map runParams) { - Object target = runParams.get(AbilityKey.DamageTarget); if (target instanceof Card) { target = CardUtil.getLKICopy((Card)runParams.get(AbilityKey.DamageTarget)); From 1c65c6c3cc05601c8ceee83544285b06a186e02a Mon Sep 17 00:00:00 2001 From: tool4EvEr Date: Sat, 11 Jun 2022 17:32:42 +0200 Subject: [PATCH 19/25] Capricopian PW fix --- .../game/ability/effects/ChangeCombatantsEffect.java | 5 +++-- .../forge/game/staticability/StaticAbilityCantBeCast.java | 8 ++++---- forge-gui/res/cardsfolder/c/capricopian.txt | 4 ++-- forge-gui/res/cardsfolder/c/chronozoa.txt | 5 ++--- forge-gui/res/cardsfolder/e/epic_experiment.txt | 2 +- forge-gui/res/cardsfolder/m/martial_impetus.txt | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/ChangeCombatantsEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ChangeCombatantsEffect.java index a62b98dc667..c3d65a43026 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ChangeCombatantsEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ChangeCombatantsEffect.java @@ -21,7 +21,7 @@ import forge.game.spellability.SpellAbilityStackInstance; import forge.game.spellability.TargetRestrictions; import forge.util.CardTranslation; import forge.util.Localizer; -import forge.util.collect.FCollectionView; +import forge.util.collect.FCollection; public class ChangeCombatantsEffect extends SpellAbilityEffect { @@ -47,7 +47,8 @@ public class ChangeCombatantsEffect extends SpellAbilityEffect { if ((tgt == null) || c.canBeTargetedBy(sa)) { final Combat combat = game.getCombat(); final GameEntity originalDefender = combat.getDefenderByAttacker(c); - final FCollectionView defs = combat.getDefenders(); + final FCollection defs = new FCollection<>(); + defs.addAll(sa.hasParam("PlayerOnly") ? combat.getDefendingPlayers() : combat.getDefenders()); String title = Localizer.getInstance().getMessage("lblChooseDefenderToAttackWithCard", CardTranslation.getTranslatedName(c.getName())); Map params = Maps.newHashMap(); diff --git a/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantBeCast.java b/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantBeCast.java index c158cac8b62..ed95f9ce562 100644 --- a/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantBeCast.java +++ b/forge-game/src/main/java/forge/game/staticability/StaticAbilityCantBeCast.java @@ -109,7 +109,7 @@ public class StaticAbilityCantBeCast { return false; } - if (stAb.hasParam("OnlySorcerySpeed") && (activator != null) && activator.canCastSorcery()) { + if (stAb.hasParam("OnlySorcerySpeed") && activator != null && activator.canCastSorcery()) { return false; } @@ -120,12 +120,12 @@ public class StaticAbilityCantBeCast { } } - if (stAb.hasParam("NonCasterTurn") && (activator != null) + if (stAb.hasParam("NonCasterTurn") && activator != null && activator.getGame().getPhaseHandler().isPlayerTurn(activator)) { return false; } - if (stAb.hasParam("cmcGT") && (activator != null)) { + if (stAb.hasParam("cmcGT") && activator != null) { if (stAb.getParam("cmcGT").equals("Turns")) { if (card.getCMC() <= activator.getTurn()) { return false; @@ -176,7 +176,7 @@ public class StaticAbilityCantBeCast { return false; } - if (stAb.hasParam("NonActivatorTurn") && (activator != null) + if (stAb.hasParam("NonActivatorTurn") && activator != null && activator.getGame().getPhaseHandler().isPlayerTurn(activator)) { return false; } diff --git a/forge-gui/res/cardsfolder/c/capricopian.txt b/forge-gui/res/cardsfolder/c/capricopian.txt index 0f465c0f297..14a80953511 100644 --- a/forge-gui/res/cardsfolder/c/capricopian.txt +++ b/forge-gui/res/cardsfolder/c/capricopian.txt @@ -4,7 +4,7 @@ Types:Creature Goat Hydra PT:0/0 K:etbCounter:P1P1:X SVar:X:Count$xPaid -A:AB$ PutCounter | Cost$ 2 | Activator$ Player.attackedBySourceThisCombat | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBReselect | ActivationPhases$ Declare Attackers | AILogic$ AlwaysWithNoTgt | SpellDescription$ Put a +1/+1 counter on CARDNAME, then you may reselect which player CARDNAME is attacking. Only the player CARDNAME is attacking may activate this ability and only during the declare attackers step. (It can't attack its controller.) -SVar:DBReselect:DB$ ChangeCombatants | Defined$ Self | AILogic$ WeakestOppExceptCtrl +A:AB$ PutCounter | Cost$ 2 | Activator$ Player | IsPresent$ Card.Self+attackingYou | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 | SubAbility$ DBReselect | ActivationPhases$ Declare Attackers | AILogic$ AlwaysWithNoTgt | SpellDescription$ Put a +1/+1 counter on CARDNAME, then you may reselect which player CARDNAME is attacking. Only the player CARDNAME is attacking may activate this ability and only during the declare attackers step. (It can't attack its controller.) +SVar:DBReselect:DB$ ChangeCombatants | Defined$ Self | AILogic$ WeakestOppExceptCtrl | PlayerOnly$ True DeckHas:Ability$Counters Oracle:Capricopian enters the battlefield with X +1/+1 counters on it.\n{2}: Put a +1/+1 counter on Capricopian, then you may reselect which player Capricopian is attacking. Only the player Capricopian is attacking may activate this ability and only during the declare attackers step. (It can't attack its controller.) diff --git a/forge-gui/res/cardsfolder/c/chronozoa.txt b/forge-gui/res/cardsfolder/c/chronozoa.txt index 6c8c1fb4226..1f6e402285d 100644 --- a/forge-gui/res/cardsfolder/c/chronozoa.txt +++ b/forge-gui/res/cardsfolder/c/chronozoa.txt @@ -4,7 +4,6 @@ Types:Creature Illusion PT:3/3 K:Flying K:Vanishing:3 -T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigCopyPermanent | TriggerDescription$ When CARDNAME dies, if it had no time counters on it, create two tokens that are copies of it. -SVar:TrigCopyPermanent:DB$ CopyPermanent | Defined$ TriggeredCard | NumCopies$ 2 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ0 -SVar:X:TriggeredCard$CardCounters.TIME +T:Mode$ ChangesZone | ValidCard$ Card.Self+counters_EQ0_TIME | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigCopyPermanent | TriggerDescription$ When CARDNAME dies, if it had no time counters on it, create two tokens that are copies of it. +SVar:TrigCopyPermanent:DB$ CopyPermanent | Defined$ TriggeredCard | NumCopies$ 2 Oracle:Flying\nVanishing 3 (This creature enters the battlefield with three time counters on it. At the beginning of your upkeep, remove a time counter from it. When the last is removed, sacrifice it.)\nWhen Chronozoa dies, if it had no time counters on it, create two tokens that are copies of it. diff --git a/forge-gui/res/cardsfolder/e/epic_experiment.txt b/forge-gui/res/cardsfolder/e/epic_experiment.txt index a7a6436bd99..115f601db46 100644 --- a/forge-gui/res/cardsfolder/e/epic_experiment.txt +++ b/forge-gui/res/cardsfolder/e/epic_experiment.txt @@ -2,7 +2,7 @@ Name:Epic Experiment ManaCost:X U R Types:Sorcery A:SP$ Dig | Cost$ X U R | Defined$ You | DigNum$ X | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBPlay | SpellDescription$ Exile the top X cards of your library. You may cast instant and sorcery spells with mana value X or less from among them without paying their mana costs. Then put all cards exiled this way that weren't cast into your graveyard. -SVar:DBPlay:DB$ Play | Valid$ Instant.cmcLEX+IsRemembered+YouOwn,Sorcery.cmcLEX+IsRemembered+YouOwn | ValidZone$ Exile | ValidSA$ Spell | Controller$ You | WithoutManaCost$ True | Optional$ True | Amount$ All | SubAbility$ DBGrave +SVar:DBPlay:DB$ Play | Valid$ Card.IsRemembered+YouOwn | ValidZone$ Exile | ValidSA$ Instant.cmcLEX,Sorcery.cmcLEX | Controller$ You | WithoutManaCost$ True | Optional$ True | Amount$ All | SubAbility$ DBGrave SVar:DBGrave:DB$ ChangeZoneAll | Origin$ Exile | Destination$ Graveyard | ChangeType$ Card.IsRemembered+YouOwn | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:Count$xPaid diff --git a/forge-gui/res/cardsfolder/m/martial_impetus.txt b/forge-gui/res/cardsfolder/m/martial_impetus.txt index ab46a63bcef..00466e2b221 100644 --- a/forge-gui/res/cardsfolder/m/martial_impetus.txt +++ b/forge-gui/res/cardsfolder/m/martial_impetus.txt @@ -5,5 +5,5 @@ K:Enchant creature A:SP$ Attach | Cost$ 2 W | ValidTgts$ Creature | AILogic$ Pump S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ 1 | AddToughness$ 1 | Goad$ True | Description$ Enchanted creature gets +1/+1 and is goaded. (It attacks each combat if able and attacks a player other than you if able.) T:Mode$ Attacks | ValidCard$ Card.AttachedBy | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever enchanted creature attacks, each other creature that's attacking one of your opponents gets +1/+1 until end of turn. -SVar:TrigPump:DB$ PumpAll | ValidCards$ Creature.NotEnchantedBy+attackingOpponent | NumAtt$ +1 | NumDef$ +1 +SVar:TrigPump:DB$ PumpAll | ValidCards$ Creature.NotEnchantedBy+attacking Opponent | NumAtt$ +1 | NumDef$ +1 Oracle:Enchant creature\nEnchanted creature gets +1/+1 and is goaded. (It attacks each combat if able and attacks a player other than you if able.)\nWhenever enchanted creature attacks, each other creature that's attacking one of your opponents gets +1/+1 until end of turn. From 22c889d1e08f88a461d55dd80a1fc51e8f6b6682 Mon Sep 17 00:00:00 2001 From: Hans Mackowiak Date: Sat, 11 Jun 2022 11:29:43 +0200 Subject: [PATCH 20/25] Remove InternalETB and replace with UpdateResult --- .../src/main/java/forge/ai/SpellApiToAi.java | 1 - .../forge/ai/ability/CanPlayAsDrawbackAi.java | 35 ------------------- .../src/main/java/forge/game/GameAction.java | 2 +- .../main/java/forge/game/GameActionUtil.java | 3 +- .../java/forge/game/ability/AbilityUtils.java | 14 ++++---- .../main/java/forge/game/ability/ApiType.java | 1 - .../ability/effects/ETBReplacementEffect.java | 32 ----------------- .../java/forge/game/card/CardFactoryUtil.java | 24 +++---------- .../forge/game/replacement/ReplaceMoved.java | 2 +- .../game/replacement/ReplacementHandler.java | 5 +-- .../res/cardsfolder/b/boreal_outrider.txt | 5 ++- .../res/cardsfolder/b/brimstone_vandal.txt | 5 ++- .../res/cardsfolder/c/celestus_sanctifier.txt | 5 ++- .../res/cardsfolder/c/component_collector.txt | 5 ++- .../res/cardsfolder/f/firmament_sage.txt | 5 ++- .../res/cardsfolder/g/gavony_dawnguard.txt | 5 ++- ...n_god_of_winter_kaldring_the_rimestaff.txt | 6 ++-- .../cardsfolder/m/moritte_of_the_frost.txt | 5 ++- .../res/cardsfolder/m/mystic_reflection.txt | 5 ++- .../cardsfolder/o/obsessive_astronomer.txt | 5 ++- forge-gui/res/cardsfolder/s/semesters_end.txt | 10 +++--- forge-gui/res/cardsfolder/s/spark_double.txt | 10 +++--- forge-gui/res/cardsfolder/s/storyweave.txt | 3 +- .../res/cardsfolder/s/sunrise_cavalier.txt | 5 ++- .../res/cardsfolder/s/sunstreak_phoenix.txt | 5 ++- .../res/cardsfolder/t/teferis_time_twist.txt | 5 ++- forge-gui/res/cardsfolder/t/the_celestus.txt | 5 ++- .../res/cardsfolder/upcoming/master_chef.txt | 7 ++-- .../cardsfolder/v/vadrik_astral_archmage.txt | 5 ++- 29 files changed, 61 insertions(+), 164 deletions(-) delete mode 100644 forge-ai/src/main/java/forge/ai/ability/CanPlayAsDrawbackAi.java delete mode 100644 forge-game/src/main/java/forge/game/ability/effects/ETBReplacementEffect.java diff --git a/forge-ai/src/main/java/forge/ai/SpellApiToAi.java b/forge-ai/src/main/java/forge/ai/SpellApiToAi.java index 2d72ac56d1c..28d0ced5046 100644 --- a/forge-ai/src/main/java/forge/ai/SpellApiToAi.java +++ b/forge-ai/src/main/java/forge/ai/SpellApiToAi.java @@ -185,7 +185,6 @@ public enum SpellApiToAi { .put(ApiType.WinsGame, GameWinAi.class) .put(ApiType.DamageResolve, AlwaysPlayAi.class) - .put(ApiType.InternalEtbReplacement, CanPlayAsDrawbackAi.class) .put(ApiType.InternalLegendaryRule, LegendaryRuleAi.class) .put(ApiType.InternalIgnoreEffect, CannotPlayAi.class) .build()); diff --git a/forge-ai/src/main/java/forge/ai/ability/CanPlayAsDrawbackAi.java b/forge-ai/src/main/java/forge/ai/ability/CanPlayAsDrawbackAi.java deleted file mode 100644 index 2e303b29776..00000000000 --- a/forge-ai/src/main/java/forge/ai/ability/CanPlayAsDrawbackAi.java +++ /dev/null @@ -1,35 +0,0 @@ -package forge.ai.ability; - -import forge.ai.SpellAbilityAi; -import forge.game.player.Player; -import forge.game.spellability.SpellAbility; - -public class CanPlayAsDrawbackAi extends SpellAbilityAi { - - /* (non-Javadoc) - * @see forge.card.abilityfactory.SpellAiLogic#canPlayAI(forge.game.player.Player, java.util.Map, forge.card.spellability.SpellAbility) - */ - @Override - protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) { - return false; - } - - /** - *

- * copySpellTriggerAI. - *

- * @param sa - * a {@link forge.game.spellability.SpellAbility} object. - * @param mandatory - * a boolean. - * @param af - * a {@link forge.game.ability.AbilityFactory} object. - * - * @return a boolean. - */ - @Override - protected boolean doTriggerAINoCost(Player aiPlayer, SpellAbility sa, boolean mandatory) { - return false; - } - -} diff --git a/forge-game/src/main/java/forge/game/GameAction.java b/forge-game/src/main/java/forge/game/GameAction.java index 919e35d914f..dfda9c27aa6 100644 --- a/forge-game/src/main/java/forge/game/GameAction.java +++ b/forge-game/src/main/java/forge/game/GameAction.java @@ -365,7 +365,7 @@ public class GameAction { } ReplacementResult repres = game.getReplacementHandler().run(ReplacementType.Moved, repParams); - if (repres != ReplacementResult.NotReplaced) { + if (repres != ReplacementResult.NotReplaced && repres != ReplacementResult.Updated) { // reset failed manifested Cards back to original if (c.isManifested() && !c.isInPlay()) { c.forceTurnFaceUp(); diff --git a/forge-game/src/main/java/forge/game/GameActionUtil.java b/forge-game/src/main/java/forge/game/GameActionUtil.java index 3f563ff302a..addc8e311c9 100644 --- a/forge-game/src/main/java/forge/game/GameActionUtil.java +++ b/forge-game/src/main/java/forge/game/GameActionUtil.java @@ -677,13 +677,12 @@ public final class GameActionUtil { if (!StringUtils.isNumeric(amount)) { sa.setSVar(amount, sourceCard.getSVar(amount)); } - CardFactoryUtil.setupETBReplacementAbility(sa); String desc = "It enters the battlefield with "; desc += Lang.nounWithNumeral(amount, CounterType.getType(counter).getName() + " counter"); desc += " on it."; - String repeffstr = "Event$ Moved | ValidCard$ Card.IsRemembered | Destination$ Battlefield | Description$ " + desc; + String repeffstr = "Event$ Moved | ValidCard$ Card.IsRemembered | Destination$ Battlefield | ReplacementResult$ Updated | Description$ " + desc; ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, eff, true); re.setLayer(ReplacementLayer.Other); 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 1f748ff53b2..5461441ab2d 100644 --- a/forge-game/src/main/java/forge/game/ability/AbilityUtils.java +++ b/forge-game/src/main/java/forge/game/ability/AbilityUtils.java @@ -55,6 +55,7 @@ import forge.game.phase.PhaseHandler; import forge.game.player.Player; import forge.game.player.PlayerCollection; import forge.game.player.PlayerPredicates; +import forge.game.replacement.ReplacementType; import forge.game.spellability.AbilitySub; import forge.game.spellability.LandAbility; import forge.game.spellability.OptionalCost; @@ -217,10 +218,15 @@ public class AbilityUtils { else if (defined.startsWith("Replaced") && sa instanceof SpellAbility) { final SpellAbility root = ((SpellAbility)sa).getRootAbility(); AbilityKey type = AbilityKey.fromString(defined.substring(8)); + // for Moved Effects, if it wants to know the affected Card, it might need to return the LKI + // or otherwise the timestamp does match + if (type == AbilityKey.Card && root.isReplacementAbility() && root.getReplacementEffect().getMode() == ReplacementType.Moved) { + type = AbilityKey.CardLKI; + } final Object crd = root.getReplacingObject(type); if (crd instanceof Card) { - c = game.getCardState((Card) crd); + c = (Card) crd; } else if (crd instanceof Iterable) { cards.addAll(Iterables.filter((Iterable) crd, Card.class)); } @@ -1415,11 +1421,7 @@ public class AbilityUtils { // Needed - Equip an untapped creature with Sword of the Paruns then cast Deadshot on it. Should deal 2 more damage. game.getAction().checkStaticAbilities(); // this will refresh continuous abilities for players and permanents. - if (sa.isReplacementAbility() && abSub.getApi() == ApiType.InternalEtbReplacement) { - game.getTriggerHandler().resetActiveTriggers(false); - } else { - game.getTriggerHandler().resetActiveTriggers(); - } + game.getTriggerHandler().resetActiveTriggers(!sa.isReplacementAbility()); AbilityUtils.resolveApiAbility(abSub, game); } diff --git a/forge-game/src/main/java/forge/game/ability/ApiType.java b/forge-game/src/main/java/forge/game/ability/ApiType.java index f09b5b5fffa..9016ad5f03b 100644 --- a/forge-game/src/main/java/forge/game/ability/ApiType.java +++ b/forge-game/src/main/java/forge/game/ability/ApiType.java @@ -189,7 +189,6 @@ public enum ApiType { DamageResolve (DamageResolveEffect.class), ChangeZoneResolve (ChangeZoneResolveEffect.class), - InternalEtbReplacement (ETBReplacementEffect.class), InternalLegendaryRule (CharmEffect.class), InternalIgnoreEffect (CharmEffect.class), UpdateRemember (UpdateRememberEffect.class); diff --git a/forge-game/src/main/java/forge/game/ability/effects/ETBReplacementEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ETBReplacementEffect.java deleted file mode 100644 index 77241fecdac..00000000000 --- a/forge-game/src/main/java/forge/game/ability/effects/ETBReplacementEffect.java +++ /dev/null @@ -1,32 +0,0 @@ -package forge.game.ability.effects; - -import java.util.Map; - -import forge.game.Game; -import forge.game.ability.AbilityKey; -import forge.game.ability.SpellAbilityEffect; -import forge.game.card.Card; -import forge.game.spellability.SpellAbility; - -/** - * TODO: Write javadoc for this type. - * - */ -public class ETBReplacementEffect extends SpellAbilityEffect { - @Override - public void resolve(SpellAbility sa) { - final Game game = sa.getActivatingPlayer().getGame(); - final Card card = (Card) sa.getReplacingObject(AbilityKey.Card); - - Map params = AbilityKey.newMap(); - params.put(AbilityKey.CardLKI, sa.getReplacingObject(AbilityKey.CardLKI)); - params.put(AbilityKey.ReplacementEffect, sa.getReplacementEffect()); - params.put(AbilityKey.LastStateBattlefield, sa.getReplacingObject(AbilityKey.LastStateBattlefield)); - params.put(AbilityKey.LastStateGraveyard, sa.getReplacingObject(AbilityKey.LastStateGraveyard)); - - final SpellAbility root = sa.getRootAbility(); - SpellAbility cause = (SpellAbility) root.getReplacingObject(AbilityKey.Cause); - - game.getAction().moveToPlay(card, card.getController(), cause, params); - } -} \ No newline at end of file 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 1297012b5c7..00317836bd9 100644 --- a/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-game/src/main/java/forge/game/card/CardFactoryUtil.java @@ -52,7 +52,6 @@ import forge.game.GameLogEntryType; import forge.game.ability.AbilityFactory; import forge.game.ability.AbilityKey; import forge.game.ability.AbilityUtils; -import forge.game.ability.ApiType; import forge.game.cost.Cost; import forge.game.keyword.Keyword; import forge.game.keyword.KeywordInterface; @@ -651,14 +650,13 @@ public class CardFactoryUtil { final boolean intrinsic, final String valid, final String zone) { Card host = card.getCard(); String desc = repAb.getDescription(); - setupETBReplacementAbility(repAb); if (!intrinsic) { repAb.setIntrinsic(false); } StringBuilder repEffsb = new StringBuilder(); repEffsb.append("Event$ Moved | ValidCard$ ").append(valid); - repEffsb.append(" | Destination$ Battlefield | Description$ ").append(desc); + repEffsb.append(" | Destination$ Battlefield | ReplacementResult$ Updated | Description$ ").append(desc); if (optional) { repEffsb.append(" | Optional$ True"); } @@ -751,13 +749,12 @@ public class CardFactoryUtil { } SpellAbility sa = AbilityFactory.getAbility(abStr, card); - setupETBReplacementAbility(sa); if (!intrinsic) { sa.setIntrinsic(false); } String repeffstr = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield " - + "| Secondary$ True | Description$ " + desc + (!extraparams.equals("") ? " | " + extraparams : ""); + + "| Secondary$ True | ReplacementResult$ Updated | Description$ " + desc + (!extraparams.equals("") ? " | " + extraparams : ""); ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, card.getCard(), intrinsic, card); @@ -2055,7 +2052,7 @@ public class CardFactoryUtil { // Setup ETB replacement effects final String actualRep = "Event$ Moved | Destination$ Battlefield | ValidCard$ Card.Self |" - + " | Description$ Amplify " + amplifyMagnitude + " (" + + " | ReplacementResult$ Updated | Description$ Amplify " + amplifyMagnitude + " (" + inst.getReminderText() + ")"; final String abString = "DB$ Reveal | AnyNumber$ True | RevealValid$ " @@ -2075,7 +2072,6 @@ public class CardFactoryUtil { AbilitySub saCleanup = (AbilitySub) AbilityFactory.getAbility(dbClean, card); saPut.setSubAbility(saCleanup); - setupETBReplacementAbility(saCleanup); saReveal.setSubAbility(saPut); @@ -2168,13 +2164,12 @@ public class CardFactoryUtil { inst.addReplacement(re); } else if (keyword.equals("Daybound")) { - final String actualRep = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Night | Secondary$ True | Layer$ Transform | Description$ If it is night, this permanent enters the battlefield transformed."; + final String actualRep = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Night | Secondary$ True | Layer$ Transform | ReplacementResult$ Updated | Description$ If it is night, this permanent enters the battlefield transformed."; final String abTransform = "DB$ SetState | Defined$ ReplacedCard | Mode$ Transform | ETB$ True | Daybound$ True"; ReplacementEffect re = ReplacementHandler.parseReplacement(actualRep, host, intrinsic, card); SpellAbility saTransform = AbilityFactory.getAbility(abTransform, card); - setupETBReplacementAbility(saTransform); re.setOverridingAbility(saTransform); inst.addReplacement(re); @@ -2206,11 +2201,10 @@ public class CardFactoryUtil { AbilitySub cleanupSA = (AbilitySub) AbilityFactory.getAbility(cleanupStr, card); counterSA.setSubAbility(cleanupSA); - String repeffstr = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Secondary$ True | Description$ Devour " + magnitude + " ("+ inst.getReminderText() + ")"; + String repeffstr = "Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | Secondary$ True | ReplacementResult$ Updated | Description$ Devour " + magnitude + " ("+ inst.getReminderText() + ")"; ReplacementEffect re = ReplacementHandler.parseReplacement(repeffstr, host, intrinsic, card); - setupETBReplacementAbility(cleanupSA); re.setOverridingAbility(sacrificeSA); inst.addReplacement(re); @@ -3693,14 +3687,6 @@ public class CardFactoryUtil { return altCostSA; } - private static final Map emptyMap = Maps.newTreeMap(); - public static SpellAbility setupETBReplacementAbility(SpellAbility sa) { - AbilitySub as = new AbilitySub(ApiType.InternalEtbReplacement, sa.getHostCard(), null, emptyMap); - sa.appendSubAbility(as); - return as; - // ETBReplacementMove(sa.getHostCard(), null)); - } - public static void setupAdventureAbility(Card card) { if (card.getCurrentStateName() != CardStateName.Adventure) { return; diff --git a/forge-game/src/main/java/forge/game/replacement/ReplaceMoved.java b/forge-game/src/main/java/forge/game/replacement/ReplaceMoved.java index ce068800cca..e370ca9635e 100644 --- a/forge-game/src/main/java/forge/game/replacement/ReplaceMoved.java +++ b/forge-game/src/main/java/forge/game/replacement/ReplaceMoved.java @@ -96,7 +96,7 @@ public class ReplaceMoved extends ReplacementEffect { @Override public void setReplacingObjects(Map runParams, SpellAbility sa) { sa.setReplacingObject(AbilityKey.Card, runParams.get(AbilityKey.Affected)); - sa.setReplacingObjectsFrom(runParams, AbilityKey.CardLKI, AbilityKey.Cause, AbilityKey.LastStateBattlefield, AbilityKey.LastStateGraveyard); + sa.setReplacingObjectsFrom(runParams, AbilityKey.NewCard, AbilityKey.CardLKI, AbilityKey.Cause, AbilityKey.LastStateBattlefield, AbilityKey.LastStateGraveyard); } } diff --git a/forge-game/src/main/java/forge/game/replacement/ReplacementHandler.java b/forge-game/src/main/java/forge/game/replacement/ReplacementHandler.java index 1e72eb846ca..7ce788fd936 100644 --- a/forge-game/src/main/java/forge/game/replacement/ReplacementHandler.java +++ b/forge-game/src/main/java/forge/game/replacement/ReplacementHandler.java @@ -211,6 +211,7 @@ public class ReplacementHandler { re.setHostCard(affectedCard); } runParams.put(AbilityKey.Affected, affectedCard); + runParams.put(AbilityKey.NewCard, CardUtil.getLKICopy(affectedLKI)); } game.getAction().checkStaticAbilities(false); } @@ -418,8 +419,8 @@ public class ReplacementHandler { } } - if ("Replaced".equals(replacementEffect.getParam("ReplacementResult"))) { - return ReplacementResult.Replaced; // Event is replaced without SA. + if (replacementEffect.hasParam("ReplacementResult")) { + return ReplacementResult.valueOf(replacementEffect.getParam("ReplacementResult")); // Event is replaced without SA. } // if the spellability is a replace effect then its some new logic diff --git a/forge-gui/res/cardsfolder/b/boreal_outrider.txt b/forge-gui/res/cardsfolder/b/boreal_outrider.txt index 6f454e1f28e..21b4c26cc2f 100644 --- a/forge-gui/res/cardsfolder/b/boreal_outrider.txt +++ b/forge-gui/res/cardsfolder/b/boreal_outrider.txt @@ -4,9 +4,8 @@ Types:Snow Creature Elf Warrior PT:3/2 T:Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ You | Execute$ TrigEffect | TriggerZones$ Battlefield | SnowSpentForCardsColor$ True | TriggerDescription$ Whenever you cast a creature spell, if {S} of any of that spell's colors was spent to cast it, that creature enters the battlefield with an additional +1/+1 counter on it. ({S} is mana from a snow source.) SVar:TrigEffect:DB$ Effect | RememberObjects$ TriggeredCard | ReplacementEffects$ ETBCreat -SVar:ETBCreat:Event$ Moved | ValidCard$ Card.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | Description$ That creature enters the battlefield with an additional +1/+1 counter on it. -SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 1 | SubAbility$ ToBattlefield -SVar:ToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBExile +SVar:ETBCreat:Event$ Moved | ValidCard$ Card.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | ReplacementResult$ Updated | Description$ That creature enters the battlefield with an additional +1/+1 counter on it. +SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 1 | SubAbility$ DBExile SVar:DBExile:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile DeckHints:Type$Snow DeckHas:Ability$Counters diff --git a/forge-gui/res/cardsfolder/b/brimstone_vandal.txt b/forge-gui/res/cardsfolder/b/brimstone_vandal.txt index 22dca698de2..37cf7d81cd7 100644 --- a/forge-gui/res/cardsfolder/b/brimstone_vandal.txt +++ b/forge-gui/res/cardsfolder/b/brimstone_vandal.txt @@ -3,9 +3,8 @@ ManaCost:2 R Types:Creature Devil PT:2/3 K:Menace -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day T:Mode$ DayTimeChanges | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, CARDNAME deals 1 damage to each opponent. SVar:TrigDamage:DB$ DealDamage | Defined$ Player.Opponent | NumDmg$ 1 Oracle:Menace (This creature can't be blocked except by two or more creatures.)\nIf it's neither day nor night, it becomes day as Brimstone Vandal enters the battlefield.\nWhenever day becomes night or night becomes day, Brimstone Vandal deals 1 damage to each opponent. diff --git a/forge-gui/res/cardsfolder/c/celestus_sanctifier.txt b/forge-gui/res/cardsfolder/c/celestus_sanctifier.txt index a37a6bd9326..fde2f4559e5 100644 --- a/forge-gui/res/cardsfolder/c/celestus_sanctifier.txt +++ b/forge-gui/res/cardsfolder/c/celestus_sanctifier.txt @@ -2,9 +2,8 @@ Name:Celestus Sanctifier ManaCost:2 W Types:Creature Human Cleric PT:3/2 -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day T:Mode$ DayTimeChanges | Execute$ DBDig | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, look at the top two cards of your library. Put one of them into your graveyard. SVar:DBDig:DB$ Dig | DigNum$ 2 | DestinationZone$ Graveyard | LibraryPosition2$ 0 DeckHas:Ability$Graveyard diff --git a/forge-gui/res/cardsfolder/c/component_collector.txt b/forge-gui/res/cardsfolder/c/component_collector.txt index 5a61b3861e4..1122ebc3a4c 100644 --- a/forge-gui/res/cardsfolder/c/component_collector.txt +++ b/forge-gui/res/cardsfolder/c/component_collector.txt @@ -2,9 +2,8 @@ Name:Component Collector ManaCost:2 U Types:Creature Homunculus PT:1/4 -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day T:Mode$ DayTimeChanges | Execute$ TrigTapOrUntap | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, you may tap or untap target nonland permanent. SVar:TrigTapOrUntap:DB$ TapOrUntap | ValidTgts$ Permanent.nonLand | TgtPrompt$ Select target nonland permanent Oracle:If it's neither day nor night, it becomes day as Component Collector enters the battlefield.\nWhenever day becomes night or night becomes day, you may tap or untap target nonland permanent. diff --git a/forge-gui/res/cardsfolder/f/firmament_sage.txt b/forge-gui/res/cardsfolder/f/firmament_sage.txt index 6e2a28fd737..41d58f743f9 100644 --- a/forge-gui/res/cardsfolder/f/firmament_sage.txt +++ b/forge-gui/res/cardsfolder/f/firmament_sage.txt @@ -2,9 +2,8 @@ Name:Firmament Sage ManaCost:3 U Types:Creature Human Wizard PT:2/3 -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day T:Mode$ DayTimeChanges | Execute$ DBDraw | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, draw a card. SVar:DBDraw:DB$ Draw | Defined$ You | NumCards$ 1 Oracle:If it's neither day nor night, it becomes day as Firmament Sage enters the battlefield.\nWhenever day becomes night or night becomes day, draw a card. diff --git a/forge-gui/res/cardsfolder/g/gavony_dawnguard.txt b/forge-gui/res/cardsfolder/g/gavony_dawnguard.txt index aecacd39f08..3a94aca6777 100644 --- a/forge-gui/res/cardsfolder/g/gavony_dawnguard.txt +++ b/forge-gui/res/cardsfolder/g/gavony_dawnguard.txt @@ -3,9 +3,8 @@ ManaCost:1 W W Types:Creature Human Soldier PT:3/3 K:Ward:1 -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day T:Mode$ DayTimeChanges | Execute$ TrigDig | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, look at the top four cards of your library. You may reveal a creature card with mana value 3 or less from among them and put it into your hand. Put the rest on the bottom of your library in any order. SVar:TrigDig:DB$ Dig | ForceRevealToController$ True | DigNum$ 4 | ChangeNum$ 1 | Optional$ True | ChangeValid$ Creature.cmcLE3 Oracle:Ward {1}\nIf it's neither day nor night, it becomes day as Gavony Dawnguard enters the battlefield.\nWhenever day becomes night or night becomes day, look at the top four cards of your library. You may reveal a creature card with mana value 3 or less from among them and put it into your hand. Put the rest on the bottom of your library in any order. diff --git a/forge-gui/res/cardsfolder/j/jorn_god_of_winter_kaldring_the_rimestaff.txt b/forge-gui/res/cardsfolder/j/jorn_god_of_winter_kaldring_the_rimestaff.txt index 87e0e523f17..456d500e1d0 100644 --- a/forge-gui/res/cardsfolder/j/jorn_god_of_winter_kaldring_the_rimestaff.txt +++ b/forge-gui/res/cardsfolder/j/jorn_god_of_winter_kaldring_the_rimestaff.txt @@ -18,9 +18,7 @@ Types:Legendary Snow Artifact A:AB$ Effect | Cost$ T | TgtZone$ Graveyard | ValidTgts$ Permanent.Snow+YouCtrl | TgtPrompt$ Choose target snow permanent card in your graveyard | StaticAbilities$ STPlay | RememberObjects$ Targeted | ForgetOnMoved$ Graveyard | SubAbility$ DBEffect | SpellDescription$ You may play target snow permanent card from your graveyard this turn. If you do, it enters the battlefield tapped. SVar:STPlay:Mode$ Continuous | MayPlay$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Graveyard | Description$ You may play target snow permanent card from your graveyard this turn. SVar:DBEffect:DB$ Effect | RememberObjects$ ParentTarget | ForgetOnMoved$ Stack | ReplacementEffects$ ETBCreat -SVar:ETBCreat:Event$ Moved | ValidCard$ Card.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBTap | Description$ If you do, it enters the battlefield tapped. -SVar:DBTap:DB$ Tap | Defined$ ReplacedCard | ETB$ True | SubAbility$ ToBattlefield -SVar:ToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBExile +SVar:ETBCreat:Event$ Moved | ValidCard$ Card.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBTap | ReplacementResult$ Updated | Description$ If you do, it enters the battlefield tapped. +SVar:DBTap:DB$ Tap | Defined$ ReplacedCard | ETB$ True | SubAbility$ DBExile SVar:DBExile:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile -SVar:STTapped:Mode$ Continuous | Affected$ Card.IsRemembered | AddKeyword$ CARDNAME enters the battlefield tapped. Oracle:{T}: You may play target snow permanent card from your graveyard this turn. If you do, it enters the battlefield tapped. diff --git a/forge-gui/res/cardsfolder/m/moritte_of_the_frost.txt b/forge-gui/res/cardsfolder/m/moritte_of_the_frost.txt index 78665d3e564..e54cafb56e6 100644 --- a/forge-gui/res/cardsfolder/m/moritte_of_the_frost.txt +++ b/forge-gui/res/cardsfolder/m/moritte_of_the_frost.txt @@ -6,9 +6,8 @@ K:Changeling K:ETBReplacement:Copy:DBCopy:Optional SVar:DBCopy:DB$ Clone | Choices$ Permanent.Other+YouCtrl | AddTypes$ Legendary & Snow | SubAbility$ DBConditionEffect | AddKeywords$ Changeling | SpellDescription$ You may have Moritte of the Frost enter the battlefield as a copy of a permanent you control, except it's legendary and snow in addition to its other types and, if it's a creature, it enters with two additional +1/+1 counters on it and has changeling. SVar:DBConditionEffect:DB$ Effect | RememberObjects$ Self | Name$ Moritte of the Frost Effect | ReplacementEffects$ ETBCreat -SVar:ETBCreat:Event$ Moved | ValidCard$ Creature.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | Description$ If it's a creature, it enters with two additional +1/+1 counters on it. -SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 2 | SubAbility$ ToBattlefield -SVar:ToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBExile +SVar:ETBCreat:Event$ Moved | ValidCard$ Creature.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | ReplacementResult$ Updated | Description$ If it's a creature, it enters with two additional +1/+1 counters on it. +SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 2 | SubAbility$ DBExile SVar:DBExile:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile DeckHas:Ability$Counters Oracle:Changeling (This card is every creature type.)\nYou may have Moritte of the Frost enter the battlefield as a copy of a permanent you control, except it's legendary and snow in addition to its other types and, if it's a creature, it enters with two additional +1/+1 counters on it and has changeling. diff --git a/forge-gui/res/cardsfolder/m/mystic_reflection.txt b/forge-gui/res/cardsfolder/m/mystic_reflection.txt index 70e09cf7f73..3ae4e1e2627 100644 --- a/forge-gui/res/cardsfolder/m/mystic_reflection.txt +++ b/forge-gui/res/cardsfolder/m/mystic_reflection.txt @@ -2,9 +2,8 @@ Name:Mystic Reflection ManaCost:1 U Types:Instant A:SP$ Effect | ValidTgts$ Creature.nonLegendary | TgtPrompt$ Choose target nonlegendary creature | RememberObjects$ Targeted | ReplacementEffects$ ReplaceETB | Triggers$ TrigRemove | SpellDescription$ Choose target nonlegendary creature. The next time one or more creatures or planeswalkers enter the battlefield this turn, they enter as copies of the chosen creature. -SVar:ReplaceETB:Event$ Moved | Destination$ Battlefield | ValidCard$ Creature,Planeswalker | ReplaceWith$ EnterAsCopy | Description$ The next time one or more creatures or planeswalkers enter the battlefield this turn, they enter as copies of the chosen creature. -SVar:EnterAsCopy:DB$ Clone | Defined$ Remembered | CloneTarget$ ReplacedCard | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBImprint +SVar:ReplaceETB:Event$ Moved | Destination$ Battlefield | ValidCard$ Creature,Planeswalker | ReplaceWith$ EnterAsCopy | ReplacementResult$ Updated | Description$ The next time one or more creatures or planeswalkers enter the battlefield this turn, they enter as copies of the chosen creature. +SVar:EnterAsCopy:DB$ Clone | Defined$ Remembered | CloneTarget$ ReplacedCard | SubAbility$ DBImprint SVar:DBImprint:DB$ Pump | ImprintCards$ ReplacedCard SVar:TrigRemove:Mode$ ChangesZoneAll | CheckSVar$ Z | Execute$ ExileSelf | Static$ True SVar:ExileSelf:DB$ ChangeZone | Origin$ Command | Destination$ Exile | Defined$ Self diff --git a/forge-gui/res/cardsfolder/o/obsessive_astronomer.txt b/forge-gui/res/cardsfolder/o/obsessive_astronomer.txt index f52bba4274f..db1433a96c6 100644 --- a/forge-gui/res/cardsfolder/o/obsessive_astronomer.txt +++ b/forge-gui/res/cardsfolder/o/obsessive_astronomer.txt @@ -2,9 +2,8 @@ Name:Obsessive Astronomer ManaCost:1 R Types:Creature Human Wizard PT:2/2 -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day T:Mode$ DayTimeChanges | Execute$ TrigDiscard | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, discard up to two cards, then draw that many cards. SVar:TrigDiscard:DB$ Discard | Defined$ You | NumCards$ 2 | Optional$ True | Mode$ TgtChoose | RememberDiscarded$ True | SubAbility$ DBDraw SVar:DBDraw:DB$ Draw | NumCards$ Y | SubAbility$ DBCleanup diff --git a/forge-gui/res/cardsfolder/s/semesters_end.txt b/forge-gui/res/cardsfolder/s/semesters_end.txt index 5b004bcd9d3..1828d5bd732 100644 --- a/forge-gui/res/cardsfolder/s/semesters_end.txt +++ b/forge-gui/res/cardsfolder/s/semesters_end.txt @@ -5,12 +5,10 @@ A:SP$ ChangeZone | Cost$ 3 W | ValidTgts$ Creature.YouCtrl,Planeswalker.YouCtrl SVar:DelTrig:DB$ DelayedTrigger | Mode$ Phase | Phase$ End of Turn | Execute$ TrigReturn | RememberObjects$ RememberedLKI | TriggerDescription$ Return each of them to the battlefield under its owner's control. Each of them enters the battlefield with an additional +1/+1 counter on it if it's a creature and an additional loyalty counter on it if it's a planeswalker. | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Battlefield | Defined$ DelayTriggerRememberedLKI | AnimateSubAbility$ DBConditionEffect -SVar:DBConditionEffect:DB$ Effect | RememberObjects$ Remembered | Name$ Semester's End Effect | ReplacementEffects$ ETBCreat,ETBPlans -SVar:ETBCreat:Event$ Moved | ValidCard$ Creature.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | Description$ It enters with an additional +1/+1 counter on it if it's a creature. -SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 1 | SubAbility$ ToBattlefield -SVar:ETBPlans:Event$ Moved | ValidCard$ Planeswalker.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutLOYALTY | Description$ It enters with an additional loyalty counter on it if it's a planeswalker. -SVar:DBPutLOYALTY:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ LOYALTY | ETB$ True | CounterNum$ 1 | SubAbility$ ToBattlefield -SVar:ToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBExile +SVar:DBConditionEffect:DB$ Effect | RememberObjects$ Remembered | Name$ Semester's End Effect | ReplacementEffects$ ETBCreatPlans +SVar:ETBCreatPlans:Event$ Moved | ValidCard$ Creature.IsRemembered,Planeswalker.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | ReplacementResult$ Updated | Description$ It enters with an additional +1/+1 counter on it if it's a creature, it enters with an additional loyalty counter on it if it's a planeswalker. +SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedNewCard.Creature | CounterType$ P1P1 | ETB$ True | CounterNum$ 1 | SubAbility$ DBPutLOYALTY +SVar:DBPutLOYALTY:DB$ PutCounter | Defined$ ReplacedNewCard.Planeswalker | CounterType$ LOYALTY | ETB$ True | CounterNum$ 1 | SubAbility$ DBExile SVar:DBExile:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile SVar:X:Count$Valid Permanent.YouCtrl DeckHas:Ability$Counters diff --git a/forge-gui/res/cardsfolder/s/spark_double.txt b/forge-gui/res/cardsfolder/s/spark_double.txt index 5ed7145ef7b..bf475c23325 100644 --- a/forge-gui/res/cardsfolder/s/spark_double.txt +++ b/forge-gui/res/cardsfolder/s/spark_double.txt @@ -4,12 +4,10 @@ Types:Creature Illusion PT:0/0 K:ETBReplacement:Copy:DBCopy:Optional SVar:DBCopy:DB$ Clone | Choices$ Creature.Other+YouCtrl,Planeswalker.Other+YouCtrl | NonLegendary$ True | SubAbility$ DBConditionEffect | SpellDescription$ You may have CARDNAME enter the battlefield as a copy of a creature or planeswalker you control, except it enters with an additional +1/+1 counter on it if it's a creature, it enters with an additional loyalty counter on it if it's a planeswalker, and it isn't legendary if that permanent is legendary. -SVar:DBConditionEffect:DB$ Effect | RememberObjects$ Self | Name$ Spark Double Effect | ReplacementEffects$ ETBCreat,ETBPlans -SVar:ETBCreat:Event$ Moved | ValidCard$ Creature.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | Description$ It enters with an additional +1/+1 counter on it if it's a creature. -SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 1 | SubAbility$ ToBattlefield -SVar:ETBPlans:Event$ Moved | ValidCard$ Planeswalker.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutLOYALTY | Description$ It enters with an additional loyalty counter on it if it's a planeswalker. -SVar:DBPutLOYALTY:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ LOYALTY | ETB$ True | CounterNum$ 1 | SubAbility$ ToBattlefield -SVar:ToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBExile +SVar:DBConditionEffect:DB$ Effect | RememberObjects$ Self | Name$ Spark Double Effect | ReplacementEffects$ ETBCreatPlans +SVar:ETBCreatPlans:Event$ Moved | ValidCard$ Creature.IsRemembered,Planeswalker.IsRemembered | Destination$ Battlefield | ReplaceWith$ DBPutP1P1 | ReplacementResult$ Updated | Description$ It enters with an additional +1/+1 counter on it if it's a creature, it enters with an additional loyalty counter on it if it's a planeswalker. +SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedNewCard.Creature | CounterType$ P1P1 | ETB$ True | CounterNum$ 1 | SubAbility$ DBPutLOYALTY +SVar:DBPutLOYALTY:DB$ PutCounter | Defined$ ReplacedNewCard.Planeswalker | CounterType$ LOYALTY | ETB$ True | CounterNum$ 1 | SubAbility$ DBExile SVar:DBExile:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile DeckHas:Ability$Counters SVar:NeedsToPlayVar:Z GE1 diff --git a/forge-gui/res/cardsfolder/s/storyweave.txt b/forge-gui/res/cardsfolder/s/storyweave.txt index 79636cd8574..16ba45fe97b 100644 --- a/forge-gui/res/cardsfolder/s/storyweave.txt +++ b/forge-gui/res/cardsfolder/s/storyweave.txt @@ -6,8 +6,7 @@ SVar:P1P1:DB$ PutCounter | ValidTgts$ Creature.YouCtrl | TgtPrompt$ Select targe SVar:Lore:DB$ PutCounter | ValidTgts$ Saga.YouCtrl | TgtPrompt$ Select target Saga you control | CounterType$ LORE | CounterNum$ 2 | SubAbility$ DBEffect | SpellDescription$ Put two lore counters on target Saga you control. The next time one or more enchantment creatures enter the battlefield under your control this turn, each enters with two additional +1/+1 counters on it. SVar:DBEffect:DB$ Effect | ReplacementEffects$ ReplaceETB | Triggers$ TrigRemove SVar:ReplaceETB:Event$ Moved | Destination$ Battlefield | ValidCard$ Creature.Enchantment | ReplaceWith$ DBPutP1P1 -SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 2 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBImprint +SVar:DBPutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | CounterNum$ 2 | SubAbility$ DBImprint SVar:DBImprint:DB$ Pump | ImprintCards$ ReplacedCard SVar:TrigRemove:Mode$ ChangesZoneAll | CheckSVar$ Z | Execute$ ExileSelf | Static$ True SVar:ExileSelf:DB$ ChangeZone | Origin$ Command | Destination$ Exile | Defined$ Self diff --git a/forge-gui/res/cardsfolder/s/sunrise_cavalier.txt b/forge-gui/res/cardsfolder/s/sunrise_cavalier.txt index 14ce6446a77..bd2918f4184 100644 --- a/forge-gui/res/cardsfolder/s/sunrise_cavalier.txt +++ b/forge-gui/res/cardsfolder/s/sunrise_cavalier.txt @@ -4,9 +4,8 @@ Types:Creature Human Knight PT:3/3 K:Trample K:Haste -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day T:Mode$ DayTimeChanges | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, put a +1/+1 counter on target creature you control. SVar:TrigPutCounter:DB$ PutCounter | ValidTgts$ Creature | TgtPrompt$ Select target creature | CounterType$ P1P1 | CounterNum$ 1 DeckHas:Ability$Counters diff --git a/forge-gui/res/cardsfolder/s/sunstreak_phoenix.txt b/forge-gui/res/cardsfolder/s/sunstreak_phoenix.txt index 43c0591b279..d6238cf91d4 100644 --- a/forge-gui/res/cardsfolder/s/sunstreak_phoenix.txt +++ b/forge-gui/res/cardsfolder/s/sunstreak_phoenix.txt @@ -3,9 +3,8 @@ ManaCost:2 R R Types:Creature Phoenix PT:4/2 K:Flying -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day T:Mode$ DayTimeChanges | Execute$ TrigReturn | TriggerZones$ Graveyard | TriggerDescription$ Whenever day becomes night or night becomes day, you may pay {1}{R}. If you do, return CARDNAME from your graveyard to the battlefield tapped. SVar:TrigReturn:AB$ ChangeZone | Cost$ 1 R | Origin$ Graveyard | Destination$ Battlefield | Tapped$ True DeckHas:Ability$Graveyard diff --git a/forge-gui/res/cardsfolder/t/teferis_time_twist.txt b/forge-gui/res/cardsfolder/t/teferis_time_twist.txt index d0168259415..66e97bfc4a1 100644 --- a/forge-gui/res/cardsfolder/t/teferis_time_twist.txt +++ b/forge-gui/res/cardsfolder/t/teferis_time_twist.txt @@ -5,9 +5,8 @@ A:SP$ ChangeZone | ValidTgts$ Permanent.YouCtrl | TgtPrompt$ Select target perma SVar:DBEffect:DB$ Effect | RememberObjects$ Remembered | Triggers$ ReturnEOT | ReplacementEffects$ EntersAsCreature | SubAbility$ DBCleanup | SpellDescription$ Return that card to the battlefield under its owner's control at the beginning of the next end step. If it enters the battlefield as a creature, it enters with an additional +1/+1 counter on it. SVar:ReturnEOT:Mode$ Phase | Phase$ End of Turn | Execute$ TrigReturn | TriggerDescription$ Return that card to the battlefield under its owner's control at the beginning of the next end step. If it enters the battlefield as a creature, it enters with an additional +1/+1 counter on it. SVar:TrigReturn:DB$ ChangeZone | Origin$ Exile | Destination$ Battlefield | Defined$ RememberedLKI -SVar:EntersAsCreature:Event$ Moved | ValidCard$ Creature.IsRemembered | Destination$ Battlefield | ReplaceWith$ PutP1P1 | Secondary$ True -SVar:PutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | SubAbility$ ToBattlefield -SVar:ToBattlefield:DB$ InternalEtbReplacement | SubAbility$ DBExile +SVar:EntersAsCreature:Event$ Moved | ValidCard$ Creature.IsRemembered | Destination$ Battlefield | ReplaceWith$ PutP1P1 | Secondary$ True | ReplacementResult$ Updated +SVar:PutP1P1:DB$ PutCounter | Defined$ ReplacedCard | CounterType$ P1P1 | ETB$ True | SubAbility$ DBExile SVar:DBExile:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True DeckHas:Ability$Counters diff --git a/forge-gui/res/cardsfolder/t/the_celestus.txt b/forge-gui/res/cardsfolder/t/the_celestus.txt index bcb87a0b289..bd1d2460da1 100644 --- a/forge-gui/res/cardsfolder/t/the_celestus.txt +++ b/forge-gui/res/cardsfolder/t/the_celestus.txt @@ -1,9 +1,8 @@ Name:The Celestus ManaCost:3 Types:Legendary Artifact -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day A:AB$ Mana | Cost$ T | Produced$ Any | SpellDescription$ Add one mana of any color. A:AB$ DayTime | Cost$ 3 T | Value$ Switch | SorcerySpeed$ True | SpellDescription$ If it's night, it becomes day. Otherwise, it becomes night. Activate only as a sorcery. T:Mode$ DayTimeChanges | Execute$ DBGainLife | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, you gain 1 life. You may draw a card. If you do, discard a card. diff --git a/forge-gui/res/cardsfolder/upcoming/master_chef.txt b/forge-gui/res/cardsfolder/upcoming/master_chef.txt index 85438fe5eb4..272815e24fe 100644 --- a/forge-gui/res/cardsfolder/upcoming/master_chef.txt +++ b/forge-gui/res/cardsfolder/upcoming/master_chef.txt @@ -2,10 +2,9 @@ Name:Master Chef ManaCost:2 G Types:Legendary Enchantment Background S:Mode$ Continuous | Affected$ Creature.IsCommander+YouOwn | AddReplacementEffects$ This & Other | Description$ Commander creatures you own have "This creature enters the battlefield with an additional +1/+1 counter on it" and "Other creatures you control enter with an additional +1/+1 counter on them." -SVar:This:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplaceWith$ ExtraCounter | Description$ This creature enters the battlefield with an additional +1/+1 counter on it. -SVar:Other:Event$ Moved | ValidCard$ Creature.Other+YouCtrl | Destination$ Battlefield | ReplaceWith$ ExtraCounter | Description$ Other creatures you control enter with an additional +1/+1 counter on them. -SVar:ExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +SVar:This:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplaceWith$ ExtraCounter | ReplacementResult$ Updated | Description$ This creature enters the battlefield with an additional +1/+1 counter on it. +SVar:Other:Event$ Moved | ValidCard$ Creature.Other+YouCtrl | Destination$ Battlefield | ReplaceWith$ ExtraCounter | ReplacementResult$ Updated | Description$ Other creatures you control enter with an additional +1/+1 counter on them. +SVar:ExtraCounter:DB$ PutCounter | ETB$ True | Defined$ ReplacedCard | CounterType$ P1P1 AI:RemoveDeck:NonCommander DeckHas:Ability$Counters Oracle:Commander creatures you own have "This creature enters the battlefield with an additional +1/+1 counter on it" and "Other creatures you control enter with an additional +1/+1 counter on them." diff --git a/forge-gui/res/cardsfolder/v/vadrik_astral_archmage.txt b/forge-gui/res/cardsfolder/v/vadrik_astral_archmage.txt index ef8e41c14b3..8b88309d004 100644 --- a/forge-gui/res/cardsfolder/v/vadrik_astral_archmage.txt +++ b/forge-gui/res/cardsfolder/v/vadrik_astral_archmage.txt @@ -2,9 +2,8 @@ Name:Vadrik, Astral Archmage ManaCost:1 U R Types:Legendary Creature Human Wizard PT:1/2 -R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. -SVar:DoDay:DB$ DayTime | Value$ Day | SubAbility$ ETB -SVar:ETB:DB$ InternalEtbReplacement +R:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | DayTime$ Neither | ReplaceWith$ DoDay | ReplacementResult$ Updated | Description$ If it's neither day nor night, it becomes day as CARDNAME enters the battlefield. +SVar:DoDay:DB$ DayTime | Value$ Day S:Mode$ ReduceCost | ValidCard$ Instant,Sorcery | Type$ Spell | Activator$ You | Amount$ X | Description$ Instant and sorcery spells you cast cost {X} less to cast, where X is NICKNAME's power. SVar:X:Count$CardPower T:Mode$ DayTimeChanges | Execute$ TrigPutCounter | TriggerZones$ Battlefield | TriggerDescription$ Whenever day becomes night or night becomes day, put a +1/+1 counter on NICKNAME. From 0b7033dbb96ec5ec67dd368622a60c50f6523a1b Mon Sep 17 00:00:00 2001 From: Northmoc <103371817+Northmoc@users.noreply.github.com> Date: Sat, 11 Jun 2022 17:55:57 -0400 Subject: [PATCH 21/25] Continuous + MayPlayWithFlash -> CastWithFlash (#661) * Continuous + MayPlayWithFlash -> CastWithFlash --- forge-gui/res/cardsfolder/b/breath_of_the_sleepless.txt | 2 +- forge-gui/res/cardsfolder/c/cherished_hatchling.txt | 2 +- .../res/cardsfolder/upcoming/renari_merchant_of_marvels.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/forge-gui/res/cardsfolder/b/breath_of_the_sleepless.txt b/forge-gui/res/cardsfolder/b/breath_of_the_sleepless.txt index dac1893ea07..77b00673dde 100644 --- a/forge-gui/res/cardsfolder/b/breath_of_the_sleepless.txt +++ b/forge-gui/res/cardsfolder/b/breath_of_the_sleepless.txt @@ -1,7 +1,7 @@ Name:Breath of the Sleepless ManaCost:3 U Types:Enchantment -S:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Spirit.nonToken+YouCtrl | MayPlay$ True | MayPlayPlayer$ CardOwner | MayPlayWithFlash$ True | MayPlayDontGrantZonePermissions$ True | AffectedZone$ Hand,Graveyard,Library,Exile | Description$ You may cast Spirit spells as though they had flash. +S:Mode$ CastWithFlash | ValidCard$ Spirit | ValidSA$ Spell | EffectZone$ Battlefield | Caster$ You | Description$ You may cast Spirit spells as though they had flash. T:Mode$ SpellCast | ValidCard$ Creature | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OpponentTurn$ True | Execute$ TrigTap | TriggerDescription$ Whenever you cast a creature spell during an opponent's turn, tap up to one target creature. SVar:TrigTap:DB$ Tap | TargetMin$ 0 | TargetMax$ 1 | ValidTgts$ Creature | TgtPrompt$ Select up to one target creature DeckHints:Type$Spirit diff --git a/forge-gui/res/cardsfolder/c/cherished_hatchling.txt b/forge-gui/res/cardsfolder/c/cherished_hatchling.txt index 2e507f1e769..cabbd4e336f 100644 --- a/forge-gui/res/cardsfolder/c/cherished_hatchling.txt +++ b/forge-gui/res/cardsfolder/c/cherished_hatchling.txt @@ -4,7 +4,7 @@ Types:Creature Dinosaur PT:2/1 T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Battlefield | Destination$ Graveyard | Execute$ TrigEffect | TriggerDescription$ When CARDNAME dies, you may cast Dinosaur spells this turn as though they had flash, and whenever you cast a Dinosaur spell this turn, it gains "When this creature enters the battlefield, you may have it fight another target creature." SVar:TrigEffect:DB$ Effect | Name$ Cherished Hatchling Effect | StaticAbilities$ STFlash | Triggers$ HatchlingCast -SVar:STFlash:Mode$ Continuous | EffectZone$ Command | Affected$ Dinosaur.nonToken+YouCtrl | MayPlay$ True | MayPlayPlayer$ CardOwner | MayPlayWithFlash$ True | MayPlayDontGrantZonePermissions$ True | AffectedZone$ Hand,Graveyard,Library,Exile | Description$ You may cast Dinosaur spells this turn as though they had flash. +SVar:STFlash:Mode$ CastWithFlash | ValidCard$ Dinosaur | ValidSA$ Spell | EffectZone$ Command | Caster$ You | Description$ You may cast Dinosaur spells this turn as though they had flash. SVar:HatchlingCast:Mode$ SpellCast | ValidCard$ Dinosaur | ValidActivatingPlayer$ You | Execute$ TrigHatchlingAnimate | TriggerZones$ Command | TriggerDescription$ Whenever you cast a Dinosaur spell this turn, it gains "When this creature enters the battlefield, you may have it fight another target creature." SVar:TrigHatchlingAnimate:DB$ Animate | Defined$ TriggeredCard | Duration$ Permanent | Triggers$ TrigETBHatchling | sVars$ HatchlingFight SVar:TrigETBHatchling:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ HatchlingFight | OptionalDecider$ You | TriggerDescription$ When this creature enters the battlefield, you may have it fight another target creature. diff --git a/forge-gui/res/cardsfolder/upcoming/renari_merchant_of_marvels.txt b/forge-gui/res/cardsfolder/upcoming/renari_merchant_of_marvels.txt index 085308139e8..a702b1009a7 100644 --- a/forge-gui/res/cardsfolder/upcoming/renari_merchant_of_marvels.txt +++ b/forge-gui/res/cardsfolder/upcoming/renari_merchant_of_marvels.txt @@ -2,7 +2,7 @@ Name:Renari, Merchant of Marvels ManaCost:3 U Types:Legendary Creature Dragon Artificer PT:2/4 -S:Mode$ Continuous | EffectZone$ Battlefield | Affected$ Dragon.nonToken+YouCtrl,Artifact.nonToken+YouCtrl | MayPlay$ True | MayPlayPlayer$ CardOwner | MayPlayWithFlash$ True | MayPlayDontGrantZonePermissions$ True | AffectedZone$ Hand,Graveyard,Library,Exile | Description$ You may cast Dragon spells and artifact spells as though they had flash. +S:Mode$ CastWithFlash | ValidCard$ Dragon,Artifact | ValidSA$ Spell | EffectZone$ Battlefield | Caster$ You | Description$ You may cast Dragon spells and artifact spells as though they had flash. DeckHints:Type$Dragon|Artifact K:Choose a Background Oracle:You may cast Dragon spells and artifact spells as though they had flash.\nChoose a Background (You can have a Background as a second commander.) From 3c9d2e47e1f2d38c662872611045b8a0bd5b0ea3 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 12 Jun 2022 08:14:42 +0800 Subject: [PATCH 22/25] add default startup --- forge-gui-mobile/src/forge/Forge.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/forge-gui-mobile/src/forge/Forge.java b/forge-gui-mobile/src/forge/Forge.java index 40158d2d39d..6c264b57984 100644 --- a/forge-gui-mobile/src/forge/Forge.java +++ b/forge-gui-mobile/src/forge/Forge.java @@ -403,8 +403,12 @@ public class Forge implements ApplicationListener { } else if (selector.equals("Adventure")) { openAdventure(); clearSplashScreen(); - } else + } else if (splashScreen != null) { splashScreen.setShowModeSelector(true); + } else {//default mode in case splashscreen is null at some point as seen on resume.. + openHomeDefault(); + clearSplashScreen(); + } //start background music SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS); safeToClose = true; From e8c57322a3fe7c72c19c6456b160eec3adb63078 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 11 Jun 2022 22:00:40 -0400 Subject: [PATCH 23/25] scion_of_halaster.txt tighten up --- forge-gui/res/cardsfolder/upcoming/scion_of_halaster.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/cardsfolder/upcoming/scion_of_halaster.txt b/forge-gui/res/cardsfolder/upcoming/scion_of_halaster.txt index 1d3d8326ad8..3070ced3027 100644 --- a/forge-gui/res/cardsfolder/upcoming/scion_of_halaster.txt +++ b/forge-gui/res/cardsfolder/upcoming/scion_of_halaster.txt @@ -3,11 +3,11 @@ ManaCost:1 B Types:Legendary Enchantment Background S:Mode$ Continuous | Affected$ Creature.IsCommander+YouOwn | AddReplacementEffects$ Draw | Description$ Commander creatures you own have "The first time you would draw a card each turn, instead look at the top two cards of your library. Put one of them into your graveyard and the other back on top of your library. Then draw a card." SVar:Draw:Event$ Draw | ValidPlayer$ You | ReplaceWith$ DBDig | CheckSVar$ X | SVarCompare$ EQ0 | CheckSecondSVar$ Y | SecondSVarCompare$ EQ0 | Description$ The first time you would draw a card each turn, instead look at the top two cards of your library. Put one of them into your graveyard and the other back on top of your library. Then draw a card. -SVar:DBDig:DB$ Dig | DigNum$ 2 | AnyNumber$ | DestinationZone$ Graveyard | LibraryPosition2$ 0 | SubAbility$ AllowDraw +SVar:DBDig:DB$ Dig | DigNum$ 2 | DestinationZone$ Graveyard | LibraryPosition2$ 0 | SubAbility$ AllowDraw SVar:AllowDraw:DB$ StoreSVar | SVar$ Y | Type$ Number | Expression$ 1 | SubAbility$ DBDraw SVar:DBDraw:DB$ Draw | SubAbility$ Reset SVar:Reset:DB$ StoreSVar | SVar$ Y | Type$ Number | Expression$ 0 -SVar:X:PlayerCountYou$CardsDrawn +SVar:X:Count$YouDrewThisTurn SVar:Y:Number$0 DeckHas:Ability$Graveyard AI:RemoveDeck:NonCommander From 2ce6eec7b9c9b6d0d487a41f41e39e38f42397d1 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 11 Jun 2022 22:01:06 -0400 Subject: [PATCH 24/25] CardTraitBase.meetsCommonRequirements add "CheckSecondSVar" --- .../src/main/java/forge/game/CardTraitBase.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/forge-game/src/main/java/forge/game/CardTraitBase.java b/forge-game/src/main/java/forge/game/CardTraitBase.java index 652cb6b2fc8..7fccfb5c2df 100644 --- a/forge-game/src/main/java/forge/game/CardTraitBase.java +++ b/forge-game/src/main/java/forge/game/CardTraitBase.java @@ -434,8 +434,19 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView, if (!Expressions.compare(sVar, svarOperator, operandValue)) { return false; } + if (hasParam("CheckSecondSVar")) { + final int sVar2 = AbilityUtils.calculateAmount(this.hostCard, getParam("CheckSecondSVar"), this); + final String comparator2 = getParamOrDefault("SecondSVarCompare", "GE1"); + final String svarOperator2 = comparator2.substring(0, 2); + final String svarOperand2 = comparator2.substring(2); + final int operandValue2 = AbilityUtils.calculateAmount(this.hostCard, svarOperand2, this); + if (!Expressions.compare(sVar2, svarOperator2, operandValue2)) { + return false; + } + } } + if (params.containsKey("ManaSpent")) { SpellAbility castSA = getHostCard().getCastSA(); if (castSA == null) { From 7971aa01759354703aa47244567f024fac55f7de Mon Sep 17 00:00:00 2001 From: Northmoc Date: Sat, 11 Jun 2022 22:05:34 -0400 Subject: [PATCH 25/25] remove unneeded whitespace --- forge-game/src/main/java/forge/game/CardTraitBase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/forge-game/src/main/java/forge/game/CardTraitBase.java b/forge-game/src/main/java/forge/game/CardTraitBase.java index 7fccfb5c2df..f2c791042c4 100644 --- a/forge-game/src/main/java/forge/game/CardTraitBase.java +++ b/forge-game/src/main/java/forge/game/CardTraitBase.java @@ -446,7 +446,6 @@ public abstract class CardTraitBase extends GameObject implements IHasCardView, } } - if (params.containsKey("ManaSpent")) { SpellAbility castSA = getHostCard().getCastSA(); if (castSA == null) {