From fa1128b94c421d9a988dbcb3468eb9a566e6b1cd Mon Sep 17 00:00:00 2001 From: tehdiplomat Date: Tue, 14 Aug 2018 12:22:42 -0400 Subject: [PATCH 1/6] Magus of the Balance and Reality Scramble --- .../src/main/java/forge/game/card/CardProperty.java | 6 ++++++ forge-gui/res/cardsfolder/m/magus_of_the_balance.txt | 8 ++++++++ forge-gui/res/cardsfolder/r/reality_scramble.txt | 8 ++++++++ 3 files changed, 22 insertions(+) create mode 100644 forge-gui/res/cardsfolder/m/magus_of_the_balance.txt create mode 100644 forge-gui/res/cardsfolder/r/reality_scramble.txt diff --git a/forge-game/src/main/java/forge/game/card/CardProperty.java b/forge-game/src/main/java/forge/game/card/CardProperty.java index f2f44db5681..37897b02d16 100644 --- a/forge-game/src/main/java/forge/game/card/CardProperty.java +++ b/forge-game/src/main/java/forge/game/card/CardProperty.java @@ -1069,6 +1069,12 @@ public class CardProperty { return false; } checkCard = (Card) triggeringObject; + } else if (restriction.startsWith("Remembered")) { + final Object rememberedObject = source.getFirstRemembered(); + if (!(rememberedObject instanceof Card)) { + return false; + } + checkCard = (Card) rememberedObject; } else { return false; } diff --git a/forge-gui/res/cardsfolder/m/magus_of_the_balance.txt b/forge-gui/res/cardsfolder/m/magus_of_the_balance.txt new file mode 100644 index 00000000000..0774d768300 --- /dev/null +++ b/forge-gui/res/cardsfolder/m/magus_of_the_balance.txt @@ -0,0 +1,8 @@ +Name:Magus of the Balance +ManaCost:1 W +Types:Creature Human Wizard +PT:2/2 +A:AB$ Balance | Cost$ 4 W T Sac<1/CARDNAME> | Valid$ Land | AILogic$ BalanceCreaturesAndLands | SubAbility$ BalanceHands | SpellDescription$ Each player chooses a number of lands they control equal to the number of lands controlled by the player who controls the fewest, then sacrifices the rest. Players discard cards and sacrifice creatures the same way. +SVar:BalanceHands:DB$ Balance | Zone$ Hand | SubAbility$ BalanceCreatures +SVar:BalanceCreatures:DB$ Balance | Valid$ Creature +Oracle:{4}{W}, {T}, Sacrifice Magus of the Balance: Each player chooses a number of lands they control equal to the number of lands controlled by the player who controls the fewest, then sacrifices the rest. Players discard cards and sacrifice creatures the same way. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/r/reality_scramble.txt b/forge-gui/res/cardsfolder/r/reality_scramble.txt new file mode 100644 index 00000000000..3fc3d51363f --- /dev/null +++ b/forge-gui/res/cardsfolder/r/reality_scramble.txt @@ -0,0 +1,8 @@ +Name:Reality Scramble +ManaCost:2 R R +Types:Sorcery +K:Retrace +A:SP$ ChangeZone | Cost$ 2 R R | ValidTgts$ Permanent.YouOwn | Origin$ Battlefield | Destination$ Library | LibraryPosition$ -1 | RememberLKI$ True | SubAbility$ DBRevealUntilShare | SpellDescription$ Put target permanent you own on the bottom of your library. Reveal cards from the top of your library until you reveal a card that shares a card type with that permanent. Put that card onto the battlefield and the rest on the bottom of your library in a random order. +SVar:DBRevealUntilShare:DB$ DigUntil | Valid$ Card.sharesTypeWith Remembered | FoundDestination$ Battlefield | RevealedDestination$ Library | RevealedLibraryPosition$ -1 | RevealRandomOrder$ True | SubAbility$ DBCleanup +SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True +Oracle:Put target permanent you own on the bottom of your library. Reveal cards from the top of your library until you reveal a card that shares a card type with that permanent. Put that card onto the battlefield and the rest on the bottom of your library in a random order.\nRetrace (You may cast this card from your graveyard by discarding a land card in addition to paying its other costs.) \ No newline at end of file From 41ce31497b8ac6d700e1abc5076cb2b3f506bafd Mon Sep 17 00:00:00 2001 From: tehdiplomat Date: Tue, 14 Aug 2018 13:36:33 -0400 Subject: [PATCH 2/6] Add Tawnos Urza's Apprentice --- forge-game/src/main/java/forge/game/ForgeScript.java | 2 ++ forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt diff --git a/forge-game/src/main/java/forge/game/ForgeScript.java b/forge-game/src/main/java/forge/game/ForgeScript.java index c5272c68e59..e27dcd4dc53 100644 --- a/forge-game/src/main/java/forge/game/ForgeScript.java +++ b/forge-game/src/main/java/forge/game/ForgeScript.java @@ -204,6 +204,8 @@ public class ForgeScript { if (!found) { return false; } + } else if (property.equals("YouCtrl")) { + return sa.getActivatingPlayer().equals(sourceController); } else if (sa.getHostCard() != null) { if (!sa.getHostCard().hasProperty(property, sourceController, source, spellAbility)) { return false; diff --git a/forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt b/forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt new file mode 100644 index 00000000000..0669063b921 --- /dev/null +++ b/forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt @@ -0,0 +1,6 @@ +Name:Tawnos, Urza's Apprentice +ManaCost:U R +Types:Legendary Creature Human Artificer +PT:1/3 +K:Haste +A:AB$ CopySpellAbility | Cost$ U R T | TargetType$ Activated.YouCtrl,Triggered.YouCtrl | ValidTgts$ Artifact | SpellDescription$ Copy target activated or triggered ability you control from an artifact source. You may choose new targets for the copy. (Mana abilities can’t be targeted.) From 75caf0643a2c81e977201c2ebe40d790cc434414 Mon Sep 17 00:00:00 2001 From: tehdiplomat Date: Tue, 14 Aug 2018 16:02:25 -0400 Subject: [PATCH 3/6] Added Tawnos --- forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt b/forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt index 0669063b921..9ffb43649b1 100644 --- a/forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt +++ b/forge-gui/res/cardsfolder/t/tawnos_urzas_apprentice.txt @@ -4,3 +4,4 @@ Types:Legendary Creature Human Artificer PT:1/3 K:Haste A:AB$ CopySpellAbility | Cost$ U R T | TargetType$ Activated.YouCtrl,Triggered.YouCtrl | ValidTgts$ Artifact | SpellDescription$ Copy target activated or triggered ability you control from an artifact source. You may choose new targets for the copy. (Mana abilities can’t be targeted.) +Oracle:Haste\n{U}{R}, {T}: Copy target activated or triggered ability you control from an artifact source. You may choose new targets for the copy. (Mana abilities can’t be targeted.) From 9c517070e436339eff5300ffb6671ac4edaa38ad Mon Sep 17 00:00:00 2001 From: tehdiplomat Date: Tue, 14 Aug 2018 16:18:50 -0400 Subject: [PATCH 4/6] Added Varchild --- .../cardsfolder/v/varchild_betrayer_of_kjeldor.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 forge-gui/res/cardsfolder/v/varchild_betrayer_of_kjeldor.txt diff --git a/forge-gui/res/cardsfolder/v/varchild_betrayer_of_kjeldor.txt b/forge-gui/res/cardsfolder/v/varchild_betrayer_of_kjeldor.txt new file mode 100644 index 00000000000..667ecd11252 --- /dev/null +++ b/forge-gui/res/cardsfolder/v/varchild_betrayer_of_kjeldor.txt @@ -0,0 +1,12 @@ +Name:Varchild, Betrayer of Kjeldor +ManaCost:2 R +Types:Legendary Creature Human Knight +PT:3/3 +T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage$ True | Execute$ TrigToken | TriggerDescription$ When CARDNAME deals combat damage to a player, that player creates that many 1/1 red Survivor creature tokens. +SVar:TrigToken:DB$ Token | TokenOwner$ TriggeredTarget | TokenAmount$ X | References$ X | TokenName$ Survivor | TokenTypes$ Creature,Survivor | TokenColors$ Red | TokenPower$ 1 | TokenToughness$ 1 | TokenImage$ r 1 1 survivor C18 +SVar:X:TriggerCount$DamageAmount +S:Mode$ Continuous | Affected$ Survivor | AddHiddenKeyword$ CantBlock Creature | Description$ Survivors can't block. +S:Mode$ CantAttack | ValidCard$ Creature.Survivor | Target$ You,Planeswalker.YouCtrl | Description$ Survivors your opponent control can't attack you or planeswalkers you control. +T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.Self | Execute$ TrigGainControl | TriggerDescription$ When CARDNAME leaves the battlefield, gain control of all Survivors. +SVar:TrigGainControl:DB$ GainControl | AllValid$ Survivor | NewController$ You +Oracle:When Varchild, Betrayer of Kjeldor deals combat damage to a player, that player creates that many 1/1 red Survivor creature tokens.\nSurvivors your opponent control can't attack you or planeswalkers you control.\nWhen Varchild, Betrayer of Kjeldor leaves the battlefield, gain control of all Survivors. \ No newline at end of file From 3dfa54e4da5d539edee65765de8636783073be76 Mon Sep 17 00:00:00 2001 From: tehdiplomat Date: Tue, 14 Aug 2018 17:10:04 -0400 Subject: [PATCH 5/6] Add Saheeli, the Gifted --- .../res/cardsfolder/s/saheeli_the_gifted.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 forge-gui/res/cardsfolder/s/saheeli_the_gifted.txt diff --git a/forge-gui/res/cardsfolder/s/saheeli_the_gifted.txt b/forge-gui/res/cardsfolder/s/saheeli_the_gifted.txt new file mode 100644 index 00000000000..acb0906840c --- /dev/null +++ b/forge-gui/res/cardsfolder/s/saheeli_the_gifted.txt @@ -0,0 +1,16 @@ +Name:Saheeli, the Gifted +ManaCost:2 U R +Types:Legendary Planeswalker Saheeli +Loyalty:4 +A:AB$ Token | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | TokenAmount$ 1 | TokenName$ Servo | TokenTypes$ Artifact,Creature,Servo | TokenOwner$ You | TokenColors$ Colorless | TokenPower$ 1 | TokenToughness$ 1 | TokenImage$ c 1 1 servo c18 | SpellDescription$ Create a 1/1 colorless Servo artifact creature token. +A:AB$ Effect | Cost$ AddCounter<1/LOYALTY> | Planeswalker$ True | StaticAbilities$ HBReduceCost | Triggers$ TrigCastSpell | SVars$ RemoveEffect,X | SpellDescription$ The next spell you cast this turn costs {1} less to cast for each artifact you control as you cast it. +SVar:HBReduceCost:Mode$ ReduceCost | EffectZone$ Command | Type$ Spell | ValidCard$ Card | Activator$ You | Amount$ X | References$ X | Description$ The next spell you cast this turn costs {1} less to cast for each artifact you control as you cast it. +SVar:TrigCastSpell:Mode$ SpellCast | ValidActivatingPlayer$ You | TriggerZones$ Command | Execute$ RemoveEffect | Static$ True +SVar:RemoveEffect:DB$ ChangeZone | Origin$ Command | Destination$ Exile +SVar:X:Count$Valid Artifact.YouCtrl +SVar:RemRandomDeck +A:AB$ RepeatEach | Cost$ SubCounter<7/LOYALTY> | Planeswalker$ True | Ultimate$ True | RepeatSubAbility$ DBClone | RepeatCards$ Artifact.YouCtrl | AtEOT$ ExileCombat | AddSVars$ SneakAttackEOT | SpellDescription$ For each artifact you control, create a token that's a copy of it. Those tokens gain haste. Exile those tokens at the beginning of the next end step. +SVar:DBClone:DB$ CopyPermanent | Defined$ Remembered | Keywords$ Haste | AtEOT$ Exile | AddSVars$ SneakAttackEOT | AtEOT$ Exile +SVar:SneakAttackEOT:SVar:EndOfTurnLeavePlay:True +K:CARDNAME can be your commander. +Oracle:[+1]: Create a 1/1 colorless Servo artifact creature token.\n[+1]: The next spell you cast this turn costs {1} less to cast for each artifact you control as you cast it.\n[-7]: For each artifact you control, create a token that's a copy of it. Those tokens gain haste. Exile those tokens at the beginning of the next end step.\nSaheeli, the Gifted can be your commander. \ No newline at end of file From 7be9ef06e06a7045eb799956069bca9b1906b244 Mon Sep 17 00:00:00 2001 From: tehdiplomat Date: Tue, 14 Aug 2018 17:37:53 -0400 Subject: [PATCH 6/6] Add Forge of Heroes --- forge-gui/res/cardsfolder/f/forge_of_heroes.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 forge-gui/res/cardsfolder/f/forge_of_heroes.txt diff --git a/forge-gui/res/cardsfolder/f/forge_of_heroes.txt b/forge-gui/res/cardsfolder/f/forge_of_heroes.txt new file mode 100644 index 00000000000..0d3b0636316 --- /dev/null +++ b/forge-gui/res/cardsfolder/f/forge_of_heroes.txt @@ -0,0 +1,8 @@ +Name:Forge of Heroes +ManaCost:no cost +Types:Land +A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}. +A:AB$ Pump | Cost$ T | ValidTgts$ Card.IsCommander+enteredBattlefieldThisTurn | TgtPrompt$ Select target commander that entered the battlefield this turn | SubAbility$ DBPutCounter | StackDescription$ Select target commander that entered the battlefield this turn. | SpellDescription$ Choose target commander that entered the battlefield this turn. Put a +1/+1 counter on it if it's a creature and a loyalty counter on it if it's a planeswalker. +SVar:DBPutCounter:DB$ PutCounter | Defined$ ParentTarget | CounterType$ P1P1 | CounterNum$ 1 | ConditionDefined$ ParentTarget | ConditionPresent$ Creature | ConditionCompare$ GE1 | SubAbility$ DBPutCounterCommander +SVar:DBPutCounterCommander:DB$ PutCounter | Defined$ ParentTarget | CounterType$ LOYALTY | CounterNum$ 1 | ConditionDefined$ ParentTarget | ConditionPresent$ Planeswalker | ConditionCompare$ GE1 +Oracle:{T}: Add {C}.\n{T}: Choose target commander that entered the battlefield this turn. Put a +1/+1 counter on it if it's a creature and a loyalty counter on it if it's a planeswalker.