From a6a053e10e3b0c007e86da9dfc852f5c170f8ba2 Mon Sep 17 00:00:00 2001 From: valfieri Date: Thu, 8 Oct 2020 19:18:52 +0200 Subject: [PATCH] Improved the Modal Double Faced cards for Zendikar set, added primitives that deals x damage divided on any target, added/fixed planeswalkers and improved kicker cost event handling. --- .../bin/Res/sets/primitives/borderline.txt | 125 +++++++++++++++++- .../bin/Res/sets/primitives/planeswalkers.txt | 68 ++++++++-- .../bin/Res/sets/primitives/unsupported.txt | 54 -------- projects/mtg/include/AllAbilities.h | 4 + projects/mtg/include/WEvent.h | 3 +- projects/mtg/src/AllAbilities.cpp | 4 +- projects/mtg/src/CardDescriptor.cpp | 2 +- projects/mtg/src/MTGGameZones.cpp | 8 +- projects/mtg/src/WEvent.cpp | 4 +- 9 files changed, 196 insertions(+), 76 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index b7c9eee7e..1340dd1b1 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -11228,6 +11228,13 @@ power=2 toughness=5 [/card] [card] +name=Dwarven Catapult +auto=thisforeach(X) ability$!name(Choose a creature) damage:1 target(creature|opponentBattlefield)!$ controller +text=Dwarven Catapult deals X damage divided evenly, rounded down, among all creatures target opponent controls. +mana={X}{R} +type=Instant +[/card] +[card] name=Dwarven Driller auto={T}:name(destroy) target(land) transforms((,newability[pay[[{L:2}]] name(pay 2 life) donothing?destroy])) forever text={T}: Destroy target land unless its controller has Dwarven Driller deal 2 damage to him or her. @@ -13655,6 +13662,32 @@ mana={0} type=Instant [/card] [card] +name=Fire Covenant +auto=choice name(Pay 1 Life) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 2 Life) thisforeach(variable{2}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 3 Life) thisforeach(variable{3}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 4 Life) thisforeach(variable{4}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 5 Life) thisforeach(variable{5}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 6 Life) thisforeach(variable{6}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 7 Life) thisforeach(variable{7}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 8 Life) thisforeach(variable{8}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 9 Life) thisforeach(variable{9}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 10 Life) thisforeach(variable{10}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 11 Life) thisforeach(variable{11}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 12 Life) thisforeach(variable{12}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 13 Life) thisforeach(variable{13}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 14 Life) thisforeach(variable{14}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 15 Life) thisforeach(variable{15}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 16 Life) thisforeach(variable{16}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 17 Life) thisforeach(variable{17}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 18 Life) thisforeach(variable{18}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 19 Life) thisforeach(variable{19}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +auto=choice name(Pay 20 Life) thisforeach(variable{20}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && life:-1 controller +text=As an additional cost to cast Fire Covenant, pay X life. -- Fire Covenant deals X damage divided as you choose among any number of target creatures. +mana={1}{B}{R} +type=Instant +[/card] +[card] name=Fire Prophecy target=creature auto=damage:3 @@ -17289,6 +17322,13 @@ power=2 toughness=3 [/card] [card] +name=Hail of Arrows +auto=thisforeach(X) ability$!name(Choose attacking creature) damage:1 target(creature[attacking])!$ controller +text=Hail of Arrows deals X damage divided as you choose among any number of target attacking creatures. +mana={X}{W} +type=Instant +[/card] +[card] name=Haldan, Avid Arcanist abilities=hiddenface,canplayfromexile aicode=activate moveTo(myhand) target(Pako, Arcane Retriever|mylibrary) @@ -19823,6 +19863,32 @@ type=Enchantment subtype=Aura [/card] [card] +name=Infernal Harvest +auto=if type(swamp|myBattlefield)~morethan~0 then choice name(Move 1 Swamp) name(Move 1 Swamp) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~1 then choice name(Move 2 Swamps) name(Move 2 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<2>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~2 then choice name(Move 3 Swamps) name(Move 3 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<3>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~3 then choice name(Move 4 Swamps) name(Move 4 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<4>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~4 then choice name(Move 5 Swamps) name(Move 5 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<5>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~5 then choice name(Move 6 Swamps) name(Move 6 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<6>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~6 then choice name(Move 7 Swamps) name(Move 7 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<7>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~7 then choice name(Move 8 Swamps) name(Move 8 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<8>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~8 then choice name(Move 9 Swamps) name(Move 9 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<9>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~9 then choice name(Move 10 Swamps) name(Move 10 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<10>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~10 then choice name(Move 11 Swamps) name(Move 11 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<11>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~11 then choice name(Move 12 Swamps) name(Move 12 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<12>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~12 then choice name(Move 13 Swamps) name(Move 13 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<13>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~13 then choice name(Move 14 Swamps) name(Move 14 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<14>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~14 then choice name(Move 15 Swamps) name(Move 15 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<15>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~15 then choice name(Move 16 Swamps) name(Move 16 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<16>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~16 then choice name(Move 17 Swamps) name(Move 17 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<17>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~17 then choice name(Move 18 Swamps) name(Move 18 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<18>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~19 then choice name(Move 19 Swamps) name(Move 19 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller &&& moveto(ownerhand) target(<19>swamp|myBattlefield) +auto=if type(swamp|myBattlefield)~morethan~19 then choice name(Move 20 Swamps) name(Move 20 Swamps) ability$!name(Choose a creature) damage:1 target(creature)!$ controller && moveto(ownerhand) target(<20>swamp|myBattlefield) +text=As an additional cost to cast Infernal Harvest, return X Swamps you control to their owner's hand. -- Infernal Harvest deals X damage divided as you choose among any number of target creatures. +mana={1}{B} +type=Sorcery +[/card] +[card] name=Infernal Offering auto=ability$!sacrifice notatarget(creature|mybattlefield)!$ controller && draw:2 controller auto=ability$!sacrifice notatarget(creature|mybattlefield)!$ opponent && draw:2 opponent @@ -20614,6 +20680,13 @@ power=1 toughness=1 [/card] [card] +name=Jaws of Stone +auto=foreach(mountain|myBattlefield) ability$!name(Choose target) choice name(Damage to a creature) damage:1 target(creature) _ choice name(Damage to a player) damage:1 target(player)!$ controller +text=Jaws of Stone deals X damage divided as you choose among any number of target creatures and/or players, where X is the number of Mountains you control as you cast Jaws of Stone. +mana={5}{R} +type=Sorcery +[/card] +[card] name=Jaya's Greeting target=creature auto=damage:3 @@ -23662,6 +23735,14 @@ power=5 toughness=5 [/card] [card] +name=Magmatic Core +auto=cumulativeupcost[{1}] sacrifice +auto=@each my endofturn:thisforeach(counter{0/0.1.Age}) ability$!name(Choose creature) choice name(Damage to a creature) damage:1 target(creature)!$ controller +text=Cumulative upkeep {1} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- At the beginning of your end step, Magmatic Core deals X damage divided as you choose among any number of target creatures, where X is the number of age counters on it. +mana={2}{R}{R} +type=Enchantment +[/card] +[card] name=Magmatic Sinkhole other={delve} name(Delve) auto=damage:2 target(planeswalker,creature) @@ -25365,6 +25446,32 @@ mana={3}{B}{B} type=Sorcery [/card] [card] +name=Monstrous Onslaught +auto=if compare(power:highest:*:mybattlefield)~equalto~1 then ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~2 then thisforeach(variable{2}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~3 then thisforeach(variable{3}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~4 then thisforeach(variable{4}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~5 then thisforeach(variable{5}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~6 then thisforeach(variable{6}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~7 then thisforeach(variable{7}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~8 then thisforeach(variable{8}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~9 then thisforeach(variable{9}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~10 then thisforeach(variable{10}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~11 then thisforeach(variable{11}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~12 then thisforeach(variable{12}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~13 then thisforeach(variable{13}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~14 then thisforeach(variable{14}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~15 then thisforeach(variable{15}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~16 then thisforeach(variable{16}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~17 then thisforeach(variable{17}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~18 then thisforeach(variable{18}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~equalto~19 then thisforeach(variable{19}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +auto=if compare(power:highest:*:mybattlefield)~morethan~19 then thisforeach(variable{20}) ability$!name(Choose a creature) damage:1 target(creature)!$ controller +text=Monstrous Onslaught deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast Monstrous Onslaught. +mana={3}{G}{G} +type=Sorcery +[/card] +[card] name=Monstrous Step target=creature auto=7/7 ueot @@ -31035,7 +31142,7 @@ toughness=5 [card] name=Ravenous Gigantotherium auto=may target(other creature|mybattlefield) sacrifice && counter(1/1,3) all(this) -auto=damage:damage: target(creature|opponentbattlefield) dynamicability +auto=target(creature|opponentbattlefield) dynamicability text=Devour 3 (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with three times that many +1/+1 counters on it.) -- When Ravenous Gigantotherium enters the battlefield, it deals X damage divided as you choose among up to X target creatures, where X is its power. Each of those creatures deals damage equal to its power to Ravenous Gigantotherium. mana={5}{G}{G} type=Creature @@ -32570,6 +32677,13 @@ power=4 toughness=3 [/card] [card] +name=Rock Slide +auto=thisforeach(X) ability$!name(Choose creature) choice name(Damage to a creature) damage:1 target(creature[attacking;blocking;-flying])!$ controller +text=Rock Slide deals X damage divided as you choose among any number of target attacking or blocking creatures without flying. +mana={X}{R} +type=Instant +[/card] +[card] name=Rofellos's Gift auto=target(enchantment|mygraveyard) moveto(myhand) text=Reveal any number of green cards in your hand. Return an enchantment card from your graveyard to your hand for each card revealed this way. @@ -32616,6 +32730,13 @@ mana={U} type=Instant [/card] [card] +name=Rolling Thunder +auto=thisforeach(X) ability$!name(Choose target) choice name(Damage to a creature) damage:1 target(creature) _ choice name(Damage to a player) damage:1 target(player)!$ controller +text=Rolling Thunder deals X damage divided as you choose among any number of target creatures and/or players. +mana={X}{R}{R} +type=Sorcery +[/card] +[card] name=Root Sliver abilities=nofizzle auto=lord(Sliver|stack) nofizzle @@ -44759,7 +44880,7 @@ type=Sorcery [/card] [card] name=Volcanic Wind -auto=foreach(creature|mybattlefield) ability$!name(Damage) damage:1 target(creature)!$ controller +auto=foreach(creature|battlefield) ability$!name(Damage) damage:1 target(creature)!$ controller text=Volcanic Wind deals X damage divided as you choose among any number of target creatures, where X is the number of creatures on the battlefield as you cast Volcanic Wind. mana={4}{R}{R} type=Sorcery diff --git a/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt b/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt index 5ef40b785..2055a8345 100644 --- a/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt +++ b/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt @@ -1039,18 +1039,30 @@ subtype=Huatli [card] name=Huatli, Warrior Poet auto=counter(0/0,3,loyalty) -auto={C(0/0,2,Loyalty)}:name(+2: Gain life equal to highest power) target(creature|mybattlefield) life:power:highest:*:mybattlefield controller +auto=@counterremoved(0/0,1,Loyalty) from(this) restriction{myturnonly}:name(Deals 1 damage and can't block) target(creature|opponentBattlefield) transforms((,newability[damage:1],newability[cantblock])) ueot +auto=@movedTo(this|myGraveyard) from(myBattlefield) restriction{myturnonly}:name(Deals 1 damage and can't block) target(creature|opponentBattlefield) transforms((,newability[damage:1],newability[cantblock])) ueot +auto={C(0/0,2,Loyalty)}:name(+2: Gain life equal to highest power) life:power:highest:*:mybattlefield controller auto={C(0/0,0,Loyalty)}:name(+0: Create a 3/3 Dinosaur) token(Dinosaur,Creature Dinosaur,3/3,green,trample) -auto={C(0/0,-1,Loyalty)}:name(-1: Deals 1 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-2,Loyalty)}:name(-2: Deals 2 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-3,Loyalty)}:name(-3: Deals 3 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-4,Loyalty)}:name(-4: Deals 4 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-5,Loyalty)}:name(-5: Deals 5 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-6,Loyalty)}:name(-6: Deals 6 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-7,Loyalty)}:name(-7: Deals 7 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-8,Loyalty)}:name(-8: Deals 8 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-9,Loyalty)}:name(-9: Deals 9 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller -auto={C(0/0,-10,Loyalty)}:name(-10: Deals 10 damage divided and can't block) ability$!name(Choose one) choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot _ choice name(Damage creature) damage:1 target(creature|opponentbattlefield) && cantblock ueot!$ controller +auto={C(0/0,-1,Loyalty)}:name(-1: Deals 1 damage divided and can't block) donothing +auto={C(0/0,-2,Loyalty)}:name(-2: Deals 2 damage divided and can't block) donothing +auto={C(0/0,-3,Loyalty)}:name(-3: Deals 3 damage divided and can't block) donothing +auto={C(0/0,-4,Loyalty)}:name(-4: Deals 4 damage divided and can't block) donothing +auto={C(0/0,-5,Loyalty)}:name(-5: Deals 5 damage divided and can't block) donothing +auto={C(0/0,-6,Loyalty)}:name(-6: Deals 6 damage divided and can't block) donothing +auto={C(0/0,-7,Loyalty)}:name(-7: Deals 7 damage divided and can't block) donothing +auto={C(0/0,-8,Loyalty)}:name(-8: Deals 8 damage divided and can't block) donothing +auto={C(0/0,-9,Loyalty)}:name(-9: Deals 9 damage divided and can't block) donothing +auto={C(0/0,-10,Loyalty)}:name(-10: Deals 10 damage divided and can't block) donothing +auto={C(0/0,-11,Loyalty)}:name(-11: Deals 11 damage divided and can't block) donothing +auto={C(0/0,-12,Loyalty)}:name(-12: Deals 12 damage divided and can't block) donothing +auto={C(0/0,-13,Loyalty)}:name(-13: Deals 13 damage divided and can't block) donothing +auto={C(0/0,-14,Loyalty)}:name(-14: Deals 14 damage divided and can't block) donothing +auto={C(0/0,-15,Loyalty)}:name(-15: Deals 15 damage divided and can't block) donothing +auto={C(0/0,-16,Loyalty)}:name(-16: Deals 16 damage divided and can't block) donothing +auto={C(0/0,-17,Loyalty)}:name(-17: Deals 17 damage divided and can't block) donothing +auto={C(0/0,-18,Loyalty)}:name(-18: Deals 18 damage divided and can't block) donothing +auto={C(0/0,-19,Loyalty)}:name(-19: Deals 19 damage divided and can't block) donothing +auto={C(0/0,-20,Loyalty)}:name(-20: Deals 20 damage divided and can't block) donothing text=+2: You gain life equal to the greatest power among creatures you control. -- 0: Create a 3/3 green Dinosaur creature token with trample. -- -X: Huatli, Warrior Poet deals X damage divided as you choose among any number of target creatures. Creatures dealt damage this way can't block this turn. mana={3}{R}{W} type=Legendary Planeswalker @@ -1123,6 +1135,40 @@ type=Legendary Planeswalker subtype=Jace [/card] [card] +name=Jace, Mirror Mage +kicker={2} +auto=counter(0/0,1,loyalty) +auto=if paid(kicker) then clone +auto=if casted(this) then counter(0/0,3,loyalty) +auto=if casted(this) then becomes(Legendary) all(this) +auto={C(0/0,1,Loyalty)}:name(+1: Scry 2) scry:2 scrycore delayed dontshow donothing scrycoreend scryend +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 restriction{type(*[manacost=0;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-1,loyalty) restriction{type(*[manacost=1;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-2,loyalty) restriction{type(*[manacost=2;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-3,loyalty) restriction{type(*[manacost=3;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-4,loyalty) restriction{type(*[manacost=4;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-5,loyalty) restriction{type(*[manacost=5;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-6,loyalty) restriction{type(*[manacost=6;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-7,loyalty) restriction{type(*[manacost=7;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-8,loyalty) restriction{type(*[manacost=8;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-9,loyalty) restriction{type(*[manacost=9;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-10,loyalty) restriction{type(*[manacost=10;zpos=1]|mylibrary)~morethan~0 +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-11,loyalty) restriction{type(*[manacost=11;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-12,loyalty) restriction{type(*[manacost=12;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-13,loyalty) restriction{type(*[manacost=13;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-14,loyalty) restriction{type(*[manacost=14;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-15,loyalty) restriction{type(*[manacost=15;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-16,loyalty) restriction{type(*[manacost=16;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-17,loyalty) restriction{type(*[manacost=17;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-18,loyalty) restriction{type(*[manacost=18;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-19,loyalty) restriction{type(*[manacost=19;zpos=1]|mylibrary)~morethan~0} +auto={C(0/0,0,Loyalty)}:name(+0: Draw 1 and remove Loyalty counters) draw:1 && counter(0/0,-20,loyalty) restriction{type(*[manacost=20;zpos=1]|mylibrary)~morethan~0} +text=Kicker {2} -- When Jace, Mirror Mage enters the battlefield, if Jace was kicked, create a token that's a copy of Jace, Mirror Mage except it's not legendary and its starting loyalty is 1. -- +1: Scry 2. -- 0: Draw a card and reveal it. Remove a number of loyalty counters equal to that card's converted mana cost from Jace, Mirror Mage. +mana={1}{U}{U} +type=Planeswalker +subtype=Jace +[/card] +[card] name=Jace, the Living Guildpact auto=counter(0/0,5,loyalty) auto={C(0/0,1,Loyalty)}:name(+1: Look the top two and put one in graveyard) reveal:2 optionone name(put in graveyard) target(<1>*|reveal) moveto(ownergraveyard) optiononeend optiontwo name(put in library) target(<1>*|reveal) moveto(ownerlibrary) optiontwoend revealend diff --git a/projects/mtg/bin/Res/sets/primitives/unsupported.txt b/projects/mtg/bin/Res/sets/primitives/unsupported.txt index 233f06380..7bcc3cd92 100644 --- a/projects/mtg/bin/Res/sets/primitives/unsupported.txt +++ b/projects/mtg/bin/Res/sets/primitives/unsupported.txt @@ -3637,12 +3637,6 @@ mana={2}{W} type=Instant [/card] [card] -name=Dwarven Catapult -text=Dwarven Catapult deals X damage divided evenly, rounded down, among all creatures target opponent controls. -mana={X}{R} -type=Instant -[/card] -[card] name=Dwarven Sea Clan text={T}: Choose target attacking or blocking creature whose controller controls an Island. Dwarven Sea Clan deals 2 damage to that creature at end of combat. Activate this ability only before the end of combat step. mana={2}{R} @@ -4371,12 +4365,6 @@ mana={5}{B} type=Sorcery [/card] [card] -name=Fire Covenant -text=As an additional cost to cast Fire Covenant, pay X life. -- Fire Covenant deals X damage divided as you choose among any number of target creatures. -mana={1}{B}{R} -type=Instant -[/card] -[card] name=Fire Juggler text=Whenever Fire Juggler becomes blocked, clash with an opponent. If you win, Fire Juggler deals 4 damage to each creature blocking it. (Each clashing player reveals the top card of his or her library, then puts that card on the top or bottom. A player wins if his or her card had a higher converted mana cost.) mana={2}{R} @@ -5780,12 +5768,6 @@ power=1 toughness=1 [/card] [card] -name=Hail of Arrows -text=Hail of Arrows deals X damage divided as you choose among any number of target attacking creatures. -mana={X}{W} -type=Instant -[/card] -[card] name=Hakim, Loreweaver abilities=flying text=Flying -- {U}{U}: Return target Aura card from your graveyard to the battlefield attached to Hakim, Loreweaver. Activate this ability only during your upkeep and only if Hakim isn't enchanted. -- {U}{U}, {T}: Destroy all Auras attached to Hakim. @@ -6650,12 +6632,6 @@ mana={4}{B}{B} type=Enchantment [/card] [card] -name=Infernal Harvest -text=As an additional cost to cast Infernal Harvest, return X Swamps you control to their owner's hand. -- Infernal Harvest deals X damage divided as you choose among any number of target creatures. -mana={1}{B} -type=Sorcery -[/card] -[card] name=Infernal Kirin abilities=flying text=Flying -- Whenever you cast a Spirit or Arcane spell, target player reveals his or her hand and discards all cards with that spell's converted mana cost. @@ -6980,12 +6956,6 @@ type=Artifact subtype=Contraption [/card] [card] -name=Jaws of Stone -text=Jaws of Stone deals X damage divided as you choose among any number of target creatures and/or players, where X is the number of Mountains you control as you cast Jaws of Stone. -mana={5}{R} -type=Sorcery -[/card] -[card] name=Jegantha, the Wellspring text=Companion — No card in your starting deck has more than one of the same mana symbol in its mana cost. (If this card is your chosen companion, you may cast it once from outside the game.) -- {T}: Add {W}{U}{B}{R}{G}. This mana can't be spent to pay generic mana costs. mana={4}{RG} @@ -8188,12 +8158,6 @@ power=4 toughness=4 [/card] [card] -name=Magmatic Core -text=Cumulative upkeep {1} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) -- At the beginning of your end step, Magmatic Core deals X damage divided as you choose among any number of target creatures, where X is the number of age counters on it. -mana={2}{R}{R} -type=Enchantment -[/card] -[card] name=Magus of the Arena text={3}, {T}: Tap target creature you control and target creature of an opponent's choice he or she controls. Those creatures fight each other. (Each deals damage equal to its power to the other.) mana={4}{R}{R} @@ -8915,12 +8879,6 @@ power=1 toughness=1 [/card] [card] -name=Monstrous Onslaught -text=Monstrous Onslaught deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast Monstrous Onslaught. -mana={3}{G}{G} -type=Sorcery -[/card] -[card] name=Moonlight Hunt text=Choose target creature you don't control. Each creature you control that's a Wolf or a Werewolf deals damage equal to its power to that creature. mana={1}{G} @@ -11438,12 +11396,6 @@ power=3 toughness=3 [/card] [card] -name=Rock Slide -text=Rock Slide deals X damage divided as you choose among any number of target attacking or blocking creatures without flying. -mana={X}{R} -type=Instant -[/card] -[card] name=Rocket-Powered Turbo Slug text=Super haste (This may attack the turn before you play it. (You may put this card into play from your hand, tapped and attacking, during your declare attackers step. If you do, you lose the game at the end of your next turn unless you pay this card's mana cost during that turn.)) mana={3}{R} @@ -11459,12 +11411,6 @@ mana={1} type=Artifact [/card] [card] -name=Rolling Thunder -text=Rolling Thunder deals X damage divided as you choose among any number of target creatures and/or players. -mana={X}{R}{R} -type=Sorcery -[/card] -[card] name=Roots of All Evil text=When you set this scheme in motion, put five 1/1 green Saproling creature tokens onto the battlefield. type=Scheme diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index ac1ca730d..7c2787538 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -1326,6 +1326,10 @@ public: return 0; if(isSuspended && !source->suspended) return 0; + if(e->forcetrigger){ //Added a force trigger for modal double faced card (eg. Zendikar Rising) + triggeredTurn = game->turn; + return 1; + } if (!toTcZone->targetsZone(e->to)) return 0; if (!toTcCard->canTarget(e->card)) return 0; if (fromTcZone && !fromTcZone->targetsZone(e->from)) return 0; diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 70d5f72db..fe7a786b2 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -41,7 +41,8 @@ struct WEventZoneChange : public WEvent { MTGCardInstance * card; MTGGameZone * from; MTGGameZone * to; - WEventZoneChange(MTGCardInstance * card, MTGGameZone * from, MTGGameZone *to); + bool forcetrigger; //Added a force trigger for modal double faced card (eg. Zendikar Rising) + WEventZoneChange(MTGCardInstance * card, MTGGameZone * from, MTGGameZone *to, bool forcetrigger = false); virtual ~WEventZoneChange() {}; virtual std::ostream& toString(std::ostream& out) const; virtual Targetable * getTarget(int target); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 49a5eee7a..0c432d5f2 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -3717,9 +3717,11 @@ int AAFlip::resolve() if(forcetype != "" && _target) // Added to flip instants and sorceries as permanents (es. Zendikar Rising Modal Double Faced cards). { - _target = _target->controller()->game->putInZone(_target,_target->currentZone,_target->controller()->game->battlefield, false); + _target = _target->controller()->game->putInZone(_target, _target->currentZone, _target->controller()->game->battlefield, false); source->addType(forcetype); source->controller()->game->battlefield->cardsSeenThisTurn.push_back(source); + WEvent * e = NEW WEventZoneChange(_target, _target->currentZone, _target->controller()->game->battlefield, true); + game->receiveEvent(e); } AbilityFactory af(game); diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index 105633b48..f0dd85efe 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -236,7 +236,7 @@ MTGCardInstance * CardDescriptor::match(MTGCardInstance * card) match = NULL; } - if ((hasKickerCost == -1 && card->getManaCost()->getKicker()) || (hasKickerCost == 1 && !card->getManaCost()->getKicker())) + if ((hasKickerCost == -1 && (card->getManaCost()->getKicker() || card->basicAbilities[Constants::HASOTHERKICKER])) || (hasKickerCost == 1 && (!card->getManaCost()->getKicker() && !card->basicAbilities[Constants::HASOTHERKICKER]))) { match = NULL; } diff --git a/projects/mtg/src/MTGGameZones.cpp b/projects/mtg/src/MTGGameZones.cpp index 563cf2391..3786e611e 100644 --- a/projects/mtg/src/MTGGameZones.cpp +++ b/projects/mtg/src/MTGGameZones.cpp @@ -569,13 +569,13 @@ MTGCardInstance * MTGPlayerCards::putInZone(MTGCardInstance * card, MTGGameZone if(shufflelibrary) copy->owner->game->library->shuffle();//shouldnt we only ever do this if you clicked close on your library gui?????? - WEvent * e = NEW WEventZoneChange(copy, from, to); - g->receiveEvent(e); + WEvent * e = NEW WEventZoneChange(copy, from, to); + g->receiveEvent(e); } if(inplaytoinplay) { - WEvent * ep = NEW WEventCardControllerChange(copy); - g->receiveEvent(ep); + WEvent * ep = NEW WEventCardControllerChange(copy); + g->receiveEvent(ep); } return ret; diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index 368aaa57e..d80e80db2 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -12,8 +12,8 @@ WEvent::WEvent(int type) : { } -WEventZoneChange::WEventZoneChange(MTGCardInstance * card, MTGGameZone * from, MTGGameZone *to) : - WEvent(CHANGE_ZONE), card(card), from(from), to(to) +WEventZoneChange::WEventZoneChange(MTGCardInstance * card, MTGGameZone * from, MTGGameZone *to, bool forcetrigger) : + WEvent(CHANGE_ZONE), card(card), from(from), to(to), forcetrigger(forcetrigger) //Added a force trigger for modal double faced card (eg. Zendikar Rising) { }