From 656643c772d7c2017d7267cdc0e503d7c6734289 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Tue, 24 May 2022 10:57:14 -0400 Subject: [PATCH 01/12] raphael_fiendish_savior.txt --- .../cardsfolder/upcoming/raphael_fiendish_savior.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt diff --git a/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt b/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt new file mode 100644 index 00000000000..505bd81b4ff --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt @@ -0,0 +1,12 @@ +Name:Raphael, Fiendish Savior +ManaCost:3 B R +Types:Legendary Creature Devil Noble +PT:4/4 +K:Flying +S:Mode$ Continuous | Affected$ Demon.Other+YouCtrl,Devil.Other+YouCtrl,Imp.Other+YouCtrl,Tiefling.Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | AddKeyword$ Lifelink | Description$ Other Demons, Devils, Imps, and Tieflings you control get +1/+1 and have lifelink. +T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | CheckSVar$ X | Execute$ TrigToken | TriggerDescription$ At the beginning of each end step, if a creature card was put into your graveyard from anywhere this turn, create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target." +SVar:TrigToken:DB$ Token | TokenScript$ r_1_1_devil_burn +SVar:X:Count$ThisTurnEntered_Graveyard_Creature.YouOwn +DeckHas:Ability$LifeGain|Token +DeckHints:Ability$Sacrifice & Type$Demon|Devil|Imp|Tiefling +Oracle:Flying\nOther Demons, Devils, Imps, and Tieflings you control get +1/+1 and have lifelink.\nAt the beginning of each end step, if a creature card was put into your graveyard from anywhere this turn, create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target." From 8649ccdbf506b36de93f9453fcb6ce1e27404b32 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Tue, 24 May 2022 11:23:40 -0400 Subject: [PATCH 02/12] lozhan_dragons_legacy.txt --- .../res/cardsfolder/upcoming/lozhan_dragons_legacy.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt diff --git a/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt b/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt new file mode 100644 index 00000000000..2e2af71ada8 --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt @@ -0,0 +1,10 @@ +Name:Lozhan, Dragons' Legacy +ManaCost:3 U R +Types:Legendary Creature Dragon Shaman +PT:4/2 +K:Flying +T:Mode$ SpellCast | ValidCard$ Card.Adventure,Dragon | ValidActivatingPlayer$ You | Execute$ TrigDamage | TriggerZones$ Battlefield | TriggerDescription$ Whenever you cast an Adventure spell or Dragon spell, CARDNAME deals damage equal to that spell's mana value to any target that isn't a commander. +SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Creature.IsNotCommander,Player,Planeswalker.IsNotCommander | TgtPrompt$ Select any target that isn't a commander | NumDmg$ X +SVar:X:TriggerCount$CastSACMC +SVar:BuffedBy:Creature.AdventureCard,Dragon +Oracle:Flying\nWhenever you cast an Adventure spell or Dragon spell, Lozhan, Dragons' Legacy deals damage equal to that spell's mana value to any target that isn't a commander. From 73a8711108a565822ba3f9c9dba848421c08cb25 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Tue, 24 May 2022 22:20:30 -0400 Subject: [PATCH 03/12] mazzy_truesword_paladin.txt --- .../upcoming/mazzy_truesword_paladin.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/mazzy_truesword_paladin.txt diff --git a/forge-gui/res/cardsfolder/upcoming/mazzy_truesword_paladin.txt b/forge-gui/res/cardsfolder/upcoming/mazzy_truesword_paladin.txt new file mode 100644 index 00000000000..dc4a083fb7f --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/mazzy_truesword_paladin.txt @@ -0,0 +1,13 @@ +Name:Mazzy, Truesword Paladin +ManaCost:1 R G W +Types:Legendary Creature Halfling Knight +PT:3/4 +T:Mode$ Attacks | ValidCard$ Creature.enchanted | Attacked$ Player.Opponent | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever an enchanted creature attacks one of your opponents, it gets +2/+0 and gains trample until end of turn. +SVar:TrigPump:DB$ Pump | Defined$ TriggeredAttacker | NumAtt$ 2 | KW$ Trample +T:Mode$ ChangesZone | TriggerZones$ Battlefield | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Aura.YouCtrl+YouOwn | Execute$ TrigExile | TriggerDescription$ Whenever an Aura you control is put into your graveyard from the battlefield, exile it. Until the end of your next turn, you may cast that card. +SVar:TrigExile:DB$ ChangeZone | Defined$ TriggeredNewCardLKICopy | Origin$ Graveyard | Destination$ Exile | RememberChanged$ True | SubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | RememberObjects$ Remembered | ForgetOnMoved$ Exile | Duration$ UntilTheEndOfYourNextTurn | SubAbility$ DBCleanup +SVar:STPlay:Mode$ Continuous | Affected$ Card.nonLand+IsRemembered | AffectedZone$ Exile | EffectZone$ Command | MayPlay$ True | Description$ Until the end of your next turn, you may cast that card. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +DeckNeeds:Type$Aura +Oracle:Whenever an enchanted creature attacks one of your opponents, it gets +2/+0 and gains trample until end of turn.\nWhenever an Aura you control is put into your graveyard from the battlefield, exile it. Until the end of your next turn, you may cast that card. From f774c7d8913eef9317e12e394f6226a7f291053e Mon Sep 17 00:00:00 2001 From: Northmoc Date: Tue, 24 May 2022 22:46:43 -0400 Subject: [PATCH 04/12] commander_liara_portyr.txt --- .../upcoming/commander_liara_portyr.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt diff --git a/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt b/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt new file mode 100644 index 00000000000..59a0598974e --- /dev/null +++ b/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt @@ -0,0 +1,15 @@ +Name:Commander Liara Portyr +ManaCost:3 R W +Types:Legendary Creature Human Soldier +PT:5/3 +T:Mode$ AttackersDeclared | AttackingPlayer$ You | Execute$ TrigDig | TriggerZones$ Battlefield | TriggerDescription$ Whenever you attack, spells you cast from exile this turn cost {X} less to cast, where X is the number of players being attacked. Exile the top X cards of your library. Until end of turn, you may cast spells from among those exiled cards. +SVar:TrigDig:DB$ Dig | DigNum$ X | ChangeNum$ All | DestinationZone$ Exile | RememberChanged$ True | SubAbility$ DBStoreNum +SVar:DBStoreNum:DB$ StoreSVar | SVar$ Y | Type$ Calculate | Expression$ X | SubAbility$ DBEffect +SVar:DBEffect:DB$ Effect | StaticAbilities$ ReduceCost,STPlay | RememberObjects$ Remembered | SubAbility$ DBCleanup +SVar:ReduceCost:Mode$ ReduceCost | EffectZone$ Command | ValidCard$ Card.wasCastFromExile | Type$ Spell | Activator$ You | Amount$ Y | Description$ Spells you cast from exile this turn cost {X} less to cast, where X is the number of players you attacked. +SVar:STPlay:Mode$ Continuous | Affected$ Card.IsRemembered+nonLand | EffectZone$ Command | AffectedZone$ Exile | MayPlay$ True | Description$ Until end of turn, you may cast spells from among those exiled cards. +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBResetNum +SVar:DBResetNum:DB$ StoreSVar | SVar$ Y | Type$ Number | Expression$ 0 +SVar:X:TriggeredPlayersAttackedTarget$Amount +SVar:Y:Number$0 +Oracle:Whenever you attack, spells you cast from exile this turn cost {X} less to cast, where X is the number of players being attacked. Exile the top X cards of your library. Until end of turn, you may cast spells from among those exiled cards. From f237acdeb8a9aba8d61ea3e091ba5879c3862777 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Thu, 26 May 2022 07:16:28 -0400 Subject: [PATCH 05/12] gorion_wise_mentor.txt AI --- forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt b/forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt index c316dcb4e36..946b2ffe238 100644 --- a/forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt +++ b/forge-gui/res/cardsfolder/upcoming/gorion_wise_mentor.txt @@ -6,4 +6,5 @@ K:Vigilance T:Mode$ SpellCast | ValidCard$ Card.Adventure | ValidActivatingPlayer$ You | Execute$ TrigCopySpell | TriggerZones$ Battlefield | OptionalDecider$ You | TriggerDescription$ Whenever you cast an Adventure spell, you may copy it. You may choose new targets for the copy. SVar:TrigCopySpell:DB$ CopySpellAbility | Defined$ TriggeredSpellAbility | MayChooseTarget$ True SVar:BuffedBy:Creature.AdventureCard +DeckNeeds:Type$Adventure Oracle:Vigilance\nWhenever you cast an Adventure spell, you may copy it. You may choose new targets for the copy. \ No newline at end of file From 966b9a01211f1dd5889a814382b8257e48a8ffea Mon Sep 17 00:00:00 2001 From: Northmoc Date: Thu, 26 May 2022 07:16:44 -0400 Subject: [PATCH 06/12] laurine_the_diversion.txt missing | --- forge-gui/res/cardsfolder/l/laurine_the_diversion.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/l/laurine_the_diversion.txt b/forge-gui/res/cardsfolder/l/laurine_the_diversion.txt index 5adbcd9c1f6..c02545bf4fd 100644 --- a/forge-gui/res/cardsfolder/l/laurine_the_diversion.txt +++ b/forge-gui/res/cardsfolder/l/laurine_the_diversion.txt @@ -4,7 +4,7 @@ Types:Legendary Creature Human Rogue PT:3/3 K:Partner:Kamber, the Plunderer K:First Strike -A:AB$ Goad | Cost$ 2 Sac<1/Artifact;Creature/artifact or creature> | ValidTgts$ Creature | TgtPrompt$ Select target creature SpellDescription$ Goad target creature. +A:AB$ Goad | Cost$ 2 Sac<1/Artifact;Creature/artifact or creature> | ValidTgts$ Creature | TgtPrompt$ Select target creature | SpellDescription$ Goad target creature. SVar:AIPreference:SacCost$Artifact.token+nonCreature,Creature.token+powerLE1,Creature.cmcLE1+powerLE1 DeckHints:Name$Kamber, the Plunderer DeckHas:Ability$Sacrifice From d71213f8f82c38da135aecbdcdb48b4a765a9d2c Mon Sep 17 00:00:00 2001 From: Northmoc Date: Thu, 26 May 2022 07:16:57 -0400 Subject: [PATCH 07/12] lozhan_dragons_legacy.txt +DeckHints --- forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt b/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt index 2e2af71ada8..e09f6793a65 100644 --- a/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt +++ b/forge-gui/res/cardsfolder/upcoming/lozhan_dragons_legacy.txt @@ -7,4 +7,5 @@ T:Mode$ SpellCast | ValidCard$ Card.Adventure,Dragon | ValidActivatingPlayer$ Yo SVar:TrigDamage:DB$ DealDamage | ValidTgts$ Creature.IsNotCommander,Player,Planeswalker.IsNotCommander | TgtPrompt$ Select any target that isn't a commander | NumDmg$ X SVar:X:TriggerCount$CastSACMC SVar:BuffedBy:Creature.AdventureCard,Dragon +DeckHints:Type$Adventure|Dragon Oracle:Flying\nWhenever you cast an Adventure spell or Dragon spell, Lozhan, Dragons' Legacy deals damage equal to that spell's mana value to any target that isn't a commander. From edbc6553f4b4010f3ef2e27548b64324490c06b8 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Thu, 26 May 2022 07:18:39 -0400 Subject: [PATCH 08/12] raphael_fiendish_savior.txt: don't trigger for tokens --- forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt b/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt index 505bd81b4ff..5dbcde70b02 100644 --- a/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt +++ b/forge-gui/res/cardsfolder/upcoming/raphael_fiendish_savior.txt @@ -6,7 +6,7 @@ K:Flying S:Mode$ Continuous | Affected$ Demon.Other+YouCtrl,Devil.Other+YouCtrl,Imp.Other+YouCtrl,Tiefling.Other+YouCtrl | AddPower$ 1 | AddToughness$ 1 | AddKeyword$ Lifelink | Description$ Other Demons, Devils, Imps, and Tieflings you control get +1/+1 and have lifelink. T:Mode$ Phase | Phase$ End of Turn | TriggerZones$ Battlefield | CheckSVar$ X | Execute$ TrigToken | TriggerDescription$ At the beginning of each end step, if a creature card was put into your graveyard from anywhere this turn, create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target." SVar:TrigToken:DB$ Token | TokenScript$ r_1_1_devil_burn -SVar:X:Count$ThisTurnEntered_Graveyard_Creature.YouOwn +SVar:X:Count$ThisTurnEntered_Graveyard_Creature.YouOwn+nonToken DeckHas:Ability$LifeGain|Token DeckHints:Ability$Sacrifice & Type$Demon|Devil|Imp|Tiefling Oracle:Flying\nOther Demons, Devils, Imps, and Tieflings you control get +1/+1 and have lifelink.\nAt the beginning of each end step, if a creature card was put into your graveyard from anywhere this turn, create a 1/1 red Devil creature token with "When this creature dies, it deals 1 damage to any target." From b2fcf62d1cd8667d9af92a40d8e811c95c267bbe Mon Sep 17 00:00:00 2001 From: Northmoc Date: Thu, 26 May 2022 09:46:03 -0400 Subject: [PATCH 09/12] commander_liara_portyr.txt +DeckHints --- forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt b/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt index 59a0598974e..7dab340302e 100644 --- a/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt +++ b/forge-gui/res/cardsfolder/upcoming/commander_liara_portyr.txt @@ -12,4 +12,5 @@ SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | SubAbility$ DBResetNum SVar:DBResetNum:DB$ StoreSVar | SVar$ Y | Type$ Number | Expression$ 0 SVar:X:TriggeredPlayersAttackedTarget$Amount SVar:Y:Number$0 +DeckHints:Keyword$Encore|Myriad Oracle:Whenever you attack, spells you cast from exile this turn cost {X} less to cast, where X is the number of players being attacked. Exile the top X cards of your library. Until end of turn, you may cast spells from among those exiled cards. From 6be30ee2e44debb6fff1e7a5829bd18c3955cce1 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Thu, 26 May 2022 13:56:31 -0400 Subject: [PATCH 10/12] ControlGainEffect fix crash --- .../java/forge/game/ability/effects/ControlGainEffect.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java index f9309c3a91a..3436759e7d8 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java @@ -134,6 +134,10 @@ public class ControlGainEffect extends SpellAbilityEffect { tgtCards = getDefinedCards(sa); } + if (tgtCards == null) { + return; + } + // in case source was LKI or still resolving if (source.isLKI() || source.getZone().is(ZoneType.Stack)) { source = game.getCardState(source); From 830e1d0469eb45371705c077db9d9e9d64bc3652 Mon Sep 17 00:00:00 2001 From: Northmoc Date: Thu, 26 May 2022 14:02:23 -0400 Subject: [PATCH 11/12] various random fixes --- forge-gui/res/cardsfolder/c/crackdown_construct.txt | 2 +- forge-gui/res/cardsfolder/r/reckless_amplimancer.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/forge-gui/res/cardsfolder/c/crackdown_construct.txt b/forge-gui/res/cardsfolder/c/crackdown_construct.txt index 25566dd7b9f..bc4abab45dd 100644 --- a/forge-gui/res/cardsfolder/c/crackdown_construct.txt +++ b/forge-gui/res/cardsfolder/c/crackdown_construct.txt @@ -2,6 +2,6 @@ Name:Crackdown Construct ManaCost:4 Types:Artifact Creature Construct PT:2/2 -T:Mode$ AbilityCast | ValidCard$ Artifact.inZoneBattlefield,Creature.inZoneBattlefield | ValidSA$ SpellAbility.nonManaAbility | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you activate an ability of an artifact or creature that isn't a mana ability, Crackdown Construct gets +1/+1 until end of turn. +T:Mode$ AbilityCast | ValidCard$ Artifact.inZoneBattlefield,Creature.inZoneBattlefield | ValidSA$ SpellAbility.nonManaAbility | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPump | TriggerDescription$ Whenever you activate an ability of an artifact or creature that isn't a mana ability, CARDNAME gets +1/+1 until end of turn. SVar:TrigPump:DB$ Pump | Defined$ Self | NumAtt$ +1 | NumDef$ +1 Oracle:Whenever you activate an ability of an artifact or creature that isn't a mana ability, Crackdown Construct gets +1/+1 until end of turn. diff --git a/forge-gui/res/cardsfolder/r/reckless_amplimancer.txt b/forge-gui/res/cardsfolder/r/reckless_amplimancer.txt index 5a9f1b06207..ad21cbe4f78 100644 --- a/forge-gui/res/cardsfolder/r/reckless_amplimancer.txt +++ b/forge-gui/res/cardsfolder/r/reckless_amplimancer.txt @@ -2,7 +2,7 @@ Name:Reckless Amplimancer ManaCost:1 G Types:Creature Elf Druid PT:2/2 -A:AB$ Pump | Cost$ 4 G | NumAtt$ +X | NumDef$ +Y | Double$ True | SpellDescription$ Double CARDNAME's power and toughness until end of turn. +A:AB$ Pump | Cost$ 4 G | NumAtt$ +X | NumDef$ +Y | Double$ True | StackDescription$ SpellDescription | SpellDescription$ Double CARDNAME's power and toughness until end of turn. SVar:X:Count$CardPower SVar:Y:Count$CardToughness Oracle:{4}{G}: Double Reckless Amplimancer's power and toughness until end of turn. From aee9a3a41d6e6cbb83bbd0b0563434d6bf9a6101 Mon Sep 17 00:00:00 2001 From: tool4EvEr Date: Thu, 26 May 2022 21:15:53 +0200 Subject: [PATCH 12/12] Fix NPE --- .../game/ability/effects/ControlGainEffect.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java b/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java index 3436759e7d8..7c175cf83b4 100644 --- a/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java +++ b/forge-game/src/main/java/forge/game/ability/effects/ControlGainEffect.java @@ -118,24 +118,22 @@ public class ControlGainEffect extends SpellAbilityEffect { final Game game = newController.getGame(); CardCollectionView tgtCards = null; - if (sa.hasParam("ControlledByTarget")) { - tgtCards = CardLists.filterControlledBy(tgtCards, getTargetPlayers(sa)); - } else if (sa.hasParam("Choices")) { + if (sa.hasParam("Choices")) { Player chooser = sa.hasParam("Chooser") ? AbilityUtils.getDefinedPlayers(source, sa.getParam("Chooser"), sa).get(0) : activator; CardCollectionView choices = CardLists.getValidCards(game.getCardsIn(ZoneType.Battlefield), sa.getParam("Choices"), activator, source, sa); if (!choices.isEmpty()) { String title = sa.hasParam("ChoiceTitle") ? sa.getParam("ChoiceTitle") : - Localizer.getInstance().getMessage("lblChooseaCard") +" "; - tgtCards = activator.getController().chooseCardsForEffect(choices, sa, title, 1, 1, false, null); + Localizer.getInstance().getMessage("lblChooseaCard") +" "; + tgtCards = chooser.getController().chooseCardsForEffect(choices, sa, title, 1, 1, false, null); } } else { tgtCards = getDefinedCards(sa); } - if (tgtCards == null) { - return; + if (tgtCards !=null & sa.hasParam("ControlledByTarget")) { + tgtCards = CardLists.filterControlledBy(tgtCards, getTargetPlayers(sa)); } // in case source was LKI or still resolving