From 16f9868929e02ce4299dce0532e1c1827950b0f3 Mon Sep 17 00:00:00 2001 From: Renato Filipe Vidal Santos <45150760+dracontes@users.noreply.github.com> Date: Wed, 17 Apr 2024 07:30:52 +0100 Subject: [PATCH] OTC: Forger's Foundry, Savvy Trader, Smirking Spelljacker, Smoldering Stagecoach (#5009) --- .../forge/game/ability/SpellAbilityEffect.java | 4 ++-- .../forge/game/ability/effects/EffectEffect.java | 7 ++++--- .../res/cardsfolder/upcoming/forgers_foundry.txt | 10 ++++++++++ .../res/cardsfolder/upcoming/savvy_trader.txt | 12 ++++++++++++ .../upcoming/smirking_spelljacker.txt | 12 ++++++++++++ .../upcoming/smoldering_stagecoach.txt | 16 ++++++++++++++++ 6 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 forge-gui/res/cardsfolder/upcoming/forgers_foundry.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/savvy_trader.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/smirking_spelljacker.txt create mode 100644 forge-gui/res/cardsfolder/upcoming/smoldering_stagecoach.txt diff --git a/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java b/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java index 2da9d3ee188..f0cf127cd94 100644 --- a/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java +++ b/forge-game/src/main/java/forge/game/ability/SpellAbilityEffect.java @@ -471,8 +471,8 @@ public abstract class SpellAbilityEffect { card.addTrigger(parsedTrigger2); } - protected static void addForgetOnCastTrigger(final Card card) { - String trig = "Mode$ SpellCast | ValidCard$ Card.IsRemembered | TriggerZones$ Command | Static$ True"; + protected static void addForgetOnCastTrigger(final Card card, String valid) { + String trig = "Mode$ SpellCast | TriggerZones$ Command | Static$ True | ValidCard$ " + valid; final Trigger parsedTrigger = TriggerHandler.parseTrigger(trig, card, true); parsedTrigger.setOverridingAbility(getForgetSpellAbility(card)); diff --git a/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java b/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java index 34c0cf601ae..6a617cc937b 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/EffectEffect.java @@ -232,10 +232,8 @@ public class EffectEffect extends SpellAbilityEffect { if (sa.hasParam("ForgetOnMoved")) { addForgetOnMovedTrigger(eff, sa.getParam("ForgetOnMoved")); if (!"Stack".equals(sa.getParam("ForgetOnMoved")) && !"False".equalsIgnoreCase(sa.getParam("ForgetOnCast"))) { - addForgetOnCastTrigger(eff); + addForgetOnCastTrigger(eff, "Card.IsRemembered"); } - } else if (sa.hasParam("ForgetOnCast")) { - addForgetOnCastTrigger(eff); } else if (sa.hasParam("ExileOnMoved")) { addExileOnMovedTrigger(eff, sa.getParam("ExileOnMoved")); } @@ -246,6 +244,9 @@ public class EffectEffect extends SpellAbilityEffect { addForgetCounterTrigger(eff, sa.getParam("ForgetCounter")); } } + if (sa.hasParam("ForgetOnCast")) { + addForgetOnCastTrigger(eff, sa.getParam("ForgetOnCast")); + } // Set Imprinted if (effectImprinted != null) { diff --git a/forge-gui/res/cardsfolder/upcoming/forgers_foundry.txt b/forge-gui/res/cardsfolder/upcoming/forgers_foundry.txt new file mode 100644 index 00000000000..13114d9083b --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/forgers_foundry.txt @@ -0,0 +1,10 @@ +Name:Forger's Foundry +ManaCost:2 U +Types:Artifact +A:AB$ Mana | Cost$ T | Produced$ U | TriggersWhenSpent$ TrigSpent | SpellDescription$ Add {U}. When you spend this mana to cast an instant or sorcery spell with mana value 3 or less, you may exile that spell instead of putting it into its owner's graveyard as it resolves. +SVar:TrigSpent:Mode$ SpellCast | ValidCard$ Instant.cmcLE3+YouCtrl,Sorcery.cmcLE3+YouCtrl | ValidActivatingPlayer$ You | Execute$ TrigEffect | TriggerDescription$ When you spend this mana to cast an instant or sorcery spell with mana value 3 or less, you may exile that spell instead of putting it into its owner's graveyard as it resolves. +SVar:TrigEffect:DB$ Effect | ReplacementEffects$ MoveToExileReplace | RememberObjects$ TriggeredCard | ExileOnMoved$ Stack | SpellDescription$ You may exile that spell instead of putting it into its owner's graveyard as it resolves. +SVar:MoveToExileReplace:Event$ Moved | ValidCard$ Card.IsRemembered | Origin$ Stack | Destination$ Graveyard | Fizzle$ False | ReplaceWith$ ReplaceExile | Optional$ True | Description$ You may exile that spell instead of putting it into its owner's graveyard as it resolves. +SVar:ReplaceExile:DB$ ChangeZone | Defined$ ReplacedCard | Origin$ Stack | Destination$ Exile | ExiledWithEffectSource$ True +A:AB$ Play | Cost$ 3 U U T | Defined$ ExiledWith | ValidSA$ Spell | Amount$ All | WithoutManaCost$ True | Optional$ True | SorcerySpeed$ True | SpellDescription$ You may cast any number of spells from among cards exiled with CARDNAME without paying their mana costs. Activate only as a sorcery. +Oracle:{T}: Add {U}. When you spend this mana to cast an instant or sorcery spell with mana value 3 or less, you may exile that spell instead of putting it into its owner's graveyard as it resolves.\n{3}{U}{U}, {T}: You may cast any number of spells from among cards exiled with Forger's Foundry without paying their mana costs. Activate only as a sorcery. diff --git a/forge-gui/res/cardsfolder/upcoming/savvy_trader.txt b/forge-gui/res/cardsfolder/upcoming/savvy_trader.txt new file mode 100644 index 00000000000..a28979a35fe --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/savvy_trader.txt @@ -0,0 +1,12 @@ +Name:Savvy Trader +ManaCost:3 G +Types:Creature Human Citizen +PT:3/3 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target permanent card from your graveyard. You may play that card for as long as it remains exiled. +SVar:TrigExile:DB$ ChangeZone | ValidTgts$ Permanent.YouOwn | TgtPrompt$ Select target permanent card from your graveyard | Origin$ Graveyard | Destination$ Exile | Imprint$ True | SubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | ForgetOnMoved$ Exile | RememberObjects$ Imprinted | Duration$ Permanent | SubAbility$ DBCleanup +SVar:STPlay:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered | MayPlay$ True | AffectedZone$ Exile | Description$ You may play that card for as long as it remains exiled. +SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True +S:Mode$ ReduceCost | ValidCard$ Card.wasNotCastFromYourHand | Activator$ You | Type$ Spell | Amount$ 1 | Description$ Spells you cast from anywhere other than your hand cost {1} less to cast. +DeckHas:Ability$Graveyard +Oracle:When Savvy Trader enters the battlefield, exile target permanent card from your graveyard. You may play that card for as long as it remains exiled.\nSpells you cast from anywhere other than your hand cost {1} less to cast. diff --git a/forge-gui/res/cardsfolder/upcoming/smirking_spelljacker.txt b/forge-gui/res/cardsfolder/upcoming/smirking_spelljacker.txt new file mode 100644 index 00000000000..691d79d0106 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/smirking_spelljacker.txt @@ -0,0 +1,12 @@ +Name:Smirking Spelljacker +ManaCost:4 U +Types:Creature Djinn Wizard Rogue +PT:3/3 +K:Flash +K:Flying +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile target spell an opponent controls. +SVar:TrigExile:DB$ ChangeZone | TargetType$ Spell.OppCtrl | ValidTgts$ Card | TgtZone$ Stack | Origin$ Stack | Fizzle$ True | Mandatory$ True | Destination$ Exile | IsCurse$ True | TgtPrompt$ Choose target spell an opponent controls +T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigPlay | IsPresent$ Card.ExiledWithSource | PresentZone$ Exile | TriggerDescription$ Whenever CARDNAME attacks, if a card is exiled with it, you may cast the exiled card without paying its mana cost. +SVar:TrigPlay:DB$ Play | Defined$ ExiledWithSource | Amount$ All | Controller$ You | WithoutManaCost$ True | ValidSA$ Spell | Optional$ True +SVar:HasAttackEffect:TRUE +Oracle:Flash\nFlying\nWhen Smirking Spelljacker enters the battlefield, exile target spell an opponent controls.\nWhenever Smirking Spelljacker attacks, if a card is exiled with it, you may cast the exiled card without paying its mana cost. diff --git a/forge-gui/res/cardsfolder/upcoming/smoldering_stagecoach.txt b/forge-gui/res/cardsfolder/upcoming/smoldering_stagecoach.txt new file mode 100644 index 00000000000..8dab0f34bdc --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/smoldering_stagecoach.txt @@ -0,0 +1,16 @@ +Name:Smoldering Stagecoach +ManaCost:3 R +Types:Artifact Vehicle +PT:*/5 +S:Mode$ Continuous | EffectZone$ All | CharacteristicDefining$ True | SetPower$ X | Description$ CARDNAME's power is equal to the number of instant and sorcery cards in your graveyard. +SVar:X:Count$ValidGraveyard Instant.YouOwn,Sorcery.YouOwn +T:Mode$ Attacks | ValidCard$ Card.Self | Execute$ TrigInstantEffect | TriggerDescription$ Whenever CARDNAME attacks, the next instant spell and the next sorcery spell you cast this turn each have cascade. +SVar:TrigInstantEffect:DB$ Effect | StaticAbilities$ CascadeInstant | ForgetOnCast$ Instant.YouCtrl | SubAbility$ DBSorceryEffect +SVar:DBSorceryEffect:DB$ Effect | StaticAbilities$ CascadeSorcery | ForgetOnCast$ Sorcery.YouCtrl +SVar:CascadeInstant:Mode$ Continuous | EffectZone$ Command | Affected$ Card.Instant+YouCtrl | AffectedZone$ Stack | AddKeyword$ Cascade | Description$ The next instant spell you cast this turn has cascade. +SVar:CascadeSorcery:Mode$ Continuous | EffectZone$ Command | Affected$ Card.Sorcery+YouCtrl | AffectedZone$ Stack | AddKeyword$ Cascade | Description$ The next sorcery spell you cast this turn has cascade. +SVar:HasAttackEffect:TRUE +K:Crew:2 +DeckHas:Keyword$Cascade +DeckHints:Type$Instant|Sorcery +Oracle:Smoldering Stagecoach's power is equal to the number of instant and sorcery cards in your graveyard.\nWhenever Smoldering Stagecoach attacks, the next instant spell and the next sorcery spell you cast this turn each have cascade.\nCrew 2