From ea5e3975951338a3809d00628f491a4d9d445d03 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 1 Feb 2017 17:11:55 +0800 Subject: [PATCH] Crew Ability Cost & Crewbonus Revised cards to use {crew(targetchooser)} (modified taptargetcost) so it can use crewbonus ability from other creatures. --- .../mtg/bin/Res/missing_cards_by_sets/KLD.txt | 37 +----- projects/mtg/bin/Res/sets/primitives/mtg.txt | 107 +++++++++++++----- projects/mtg/include/AllAbilities.h | 10 ++ projects/mtg/include/CardPrimitive.h | 3 + projects/mtg/include/ExtraCost.h | 3 +- projects/mtg/src/CardPrimitive.cpp | 12 ++ projects/mtg/src/ExtraCost.cpp | 25 +++- projects/mtg/src/MTGCardInstance.cpp | 1 + projects/mtg/src/MTGDeck.cpp | 14 ++- projects/mtg/src/ManaCost.cpp | 4 + 10 files changed, 144 insertions(+), 72 deletions(-) diff --git a/projects/mtg/bin/Res/missing_cards_by_sets/KLD.txt b/projects/mtg/bin/Res/missing_cards_by_sets/KLD.txt index 228687a01..0373cf655 100644 --- a/projects/mtg/bin/Res/missing_cards_by_sets/KLD.txt +++ b/projects/mtg/bin/Res/missing_cards_by_sets/KLD.txt @@ -116,16 +116,6 @@ mana={2}{B} type=Sorcery [/card] [card] -name=Gearshift Ace -abilities=first strike -text=First strike -- Whenever Gearshift Ace crews a Vehicle, that Vehicle gains first strike until end of turn. -mana={1}{W} -type=Creature -subtype=Dwarf Pilot -power=2 -toughness=1 -[/card] -[card] name=Gonti, Lord of Luxury abilities=deathtouch text=Deathtouch -- When Gonti, Lord of Luxury enters the battlefield, look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. For as long as that card remains exiled, you may look at it, you may cast it, and you may spend mana as though it were mana of any type to cast it. @@ -172,13 +162,6 @@ mana={4} type=Artifact [/card] [card] -name=Revoke Privileges -text=Enchant creature -- Enchanted creature can't attack, block, or crew Vehicles. -mana={2}{W} -type=Enchantment -subtype=Aura -[/card] -[card] name=Saheeli Rai auto=counter(0/0,3,loyalty) text=+1: Scry 1. Saheeli Rai deals 1 damage to each opponent. -- -2: Create a token that's a copy of target artifact or creature you control, except it's an artifact in addition to its other types. That token gains haste. Exile it at the beginning of the next end step. -- -7: Search your library for up to three artifact cards with different names, put them onto the battlefield, then shuffle your library. @@ -208,15 +191,6 @@ mana={R} type=Sorcery [/card] [card] -name=Speedway Fanatic -text=Haste -- Whenever Speedway Fanatic crews a Vehicle, that Vehicle gains haste until end of turn. -mana={1}{R} -type=Creature -subtype=Human Pilot -power=2 -toughness=1 -[/card] -[card] name=Subtle Strike text=Choose one or both — -- • Target creature gets -1/-1 until end of turn. -- • Put a +1/+1 counter on target creature. mana={1}{B} @@ -233,13 +207,4 @@ name=Verdant Crescendo text=Search your library for a basic land card and put it onto the battlefield tapped. Search your library and graveyard for a card named Nissa, Nature's Artisan, reveal it, and put it into your hand. Then shuffle your library. mana={3}{G} type=Sorcery -[/card] -[card] -name=Veteran Motorist -text=When Veteran Motorist enters the battlefield, scry 2. -- Whenever Veteran Motorist crews a Vehicle, that Vehicle gets +1/+1 until end of turn. -mana={R}{W} -type=Creature -subtype=Dwarf Pilot -power=3 -toughness=1 -[/card] +[/card] \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 79aba4ea4..3db378a8b 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -4541,11 +4541,11 @@ toughness=6 [card] name=Aradara Express abilities=menace -auto={T(other creature[power>=4]|myBattlefield)}:name(crew 4 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=4]|mybattlefield)~morethan~0} -auto={T(other creature[power>=2]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}:name(crew 4 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~1} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=3]|myBattlefield)}:name(crew 4 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}:name(crew 4 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=1]|mybattlefield)~morethan~1} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}:name(crew 4 [4 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~3} +auto={crew(other creature[power>=4]|myBattlefield)}:name(crew 4 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=4]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~3} +auto={crew(other creature[power>=2]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}:name(crew 4 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~1,compare(crewtotalpower)~morethan~3} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=3]|myBattlefield)}:name(crew 4 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~3} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}:name(crew 4 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=1]|mybattlefield)~morethan~1,compare(crewtotalpower)~morethan~3} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}:name(crew 4 [4 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~3,compare(crewtotalpower)~morethan~3} text=Menace -- Crew 4 (Tap any number of creatures you control with total power 4 or more: This Vehicle becomes an artifact creature until end of turn.) mana={5} type=Artifact @@ -8333,9 +8333,9 @@ toughness=1 [card] name=Ballista Charger auto=@combat(attacking) source(this):damage:1 target(creature,player) -auto={T(other creature[power>=3]|myBattlefield)}:name(crew 3 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}:name(crew 3 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}:name(crew 3 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2} +auto={crew(other creature[power>=3]|myBattlefield)}:name(crew 3 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~2} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}:name(crew 3 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~2} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}:name(crew 3 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2,compare(crewtotalpower)~morethan~2} text=Whenever Ballista Charger attacks, it deals 1 damage to target creature or player. -- Crew 3 (Tap any number of creatures you control with total power 3 or more: This Vehicle becomes an artifact creature until end of turn.) mana={5} type=Artifact @@ -13166,9 +13166,9 @@ toughness=4 [card] name=Bomat Bazaar Barge auto=draw:1 controller -auto={T(other creature[power>=3]|myBattlefield)}:name(crew 3 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}:name(crew 3 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}:name(crew 3 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2} +auto={crew(other creature[power>=3]|myBattlefield)}:name(crew 3 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~2} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}:name(crew 3 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~2} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}:name(crew 3 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2,compare(crewtotalpower)~morethan~2} text=When Bomat Bazaar Barge enters the battlefield, draw a card. -- Crew 3 (Tap any number of creatures you control with total power 3 or more: This Vehicle becomes an artifact creature until end of turn.) mana={4} type=Artifact @@ -24290,9 +24290,9 @@ auto={T}:Add{U} auto={T}:Add{B} auto={T}:Add{R} auto={T}:Add{G} -auto={T(other creature[power>=3]|myBattlefield)}:name(crew 3 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}:name(crew 3 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}:name(crew 3 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2} +auto={crew(other creature[power>=3]|myBattlefield)}:name(crew 3 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~2} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}:name(crew 3 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~2} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}:name(crew 3 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2,compare(crewtotalpower)~morethan~2} text={T}: Add one mana of any color to your mana pool. -- Crew 3 (Tap any number of creatures you control with total power 3 or more: This Vehicle becomes an artifact creature until end of turn.) mana={3} type=Artifact @@ -27679,13 +27679,13 @@ type=Sorcery [card] name=Demolition Stomper auto=cantbeblockedby(creature[power<=2]) -auto={T(other creature[power>=5]|myBattlefield)}:name(crew 5 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=5]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=4]|myBattlefield)}:name(crew 5 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=4]|mybattlefield)~morethan~0} -auto={T(other creature[power>=2]|myBattlefield)}{T(other creature[power>=3]|myBattlefield)}:name(crew 5 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=3]|myBattlefield)}:name(crew 5 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=1]|mybattlefield)~morethan~1} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}:name(crew 5 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~1} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}:name(crew 5 [4 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}:name(crew 5 [5 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~4} +auto={crew(other creature[power>=5]|myBattlefield)}:name(crew 5 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=5]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~4} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=4]|myBattlefield)}:name(crew 5 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=4]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~4} +auto={crew(other creature[power>=2]|myBattlefield)}{crew(other creature[power>=3]|myBattlefield)}:name(crew 5 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~4} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=3]|myBattlefield)}:name(crew 5 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=1]|mybattlefield)~morethan~1,compare(crewtotalpower)~morethan~4} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}:name(crew 5 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~1,compare(crewtotalpower)~morethan~4} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}:name(crew 5 [4 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~4} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}:name(crew 5 [5 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~4,compare(crewtotalpower)~morethan~4} text=Demolition Stomper can't be blocked by creatures with power 2 or less. -- Crew 5 (Tap any number of creatures you control with total power 5 or more: This Vehicle becomes an artifact creature until end of turn.) mana={6} type=Artifact @@ -40903,8 +40903,8 @@ type=Enchantment name=Fleetwheel Cruiser abilities=trample,haste auto=becomes(Artifact Creature) ueot -auto={T(other creature[power>=2]|myBattlefield)}:name(crew 2 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}:name(crew 2 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~1} +auto={crew(other creature[power>=2]|myBattlefield)}:name(crew 2 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~1} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}:name(crew 2 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~1,compare(crewtotalpower)~morethan~1} text=Trample, haste -- When Fleetwheel Cruiser enters the battlefield, it becomes an artifact creature until end of turn. -- Crew 2 (Tap any number of creatures you control with total power 2 or more: This Vehicle becomes an artifact creature until end of turn.) mana={4} type=Artifact @@ -43054,7 +43054,7 @@ name=Fumarole target=creature auto=destroy auto=target(land) destroy -restriction=type(creature|battlefield)~morethan~0,type(land|battlefield)~morethan~0 +restriction=type(creature|battlefield)~morethan~0,type(land|battlefield)~morethan~0,compare(lifetotal)~morethan~2 text=As an additional cost to cast Fumarole, pay 3 life. -- Destroy target creature and target land. mana={3}{B}{R}{L:3} type=Sorcery @@ -44111,6 +44111,17 @@ power=5 toughness=6 [/card] [card] +name=Gearshift Ace +abilities=first strike +crewbonus=first strike +text=First strike -- Whenever Gearshift Ace crews a Vehicle, that Vehicle gains first strike until end of turn. +mana={1}{W} +type=Creature +subtype=Dwarf Pilot +power=2 +toughness=1 +[/card] +[card] name=Geier Reach Bandit abilities=haste auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Vildin-Pack Alpha) @@ -81909,7 +81920,7 @@ toughness=2 [card] name=Ovalchase Dragster abilities=trample,haste -auto={T(other creature[power>=1]|myBattlefield)}:name(crew 1 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0} +auto={crew(other creature[power>=1]|myBattlefield)}:name(crew 1 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~0} text=Trample, haste -- Crew 1 (Tap any number of creatures you control with total power 1 or more: This Vehicle becomes an artifact creature until end of turn.) mana={4} type=Artifact @@ -92034,6 +92045,8 @@ toughness=2 name=Renegade Freighter auto=this(attacking) 1/1 auto=this(attacking) trample +auto={crew(other creature[power>=2]|myBattlefield)}:name(crew 2 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~1} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}:name(crew 2 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~1,compare(crewtotalpower)~morethan~1} text=Whenever Renegade Freighter attacks, it gets +1/+1 and gains trample until end of turn. -- Crew 2 (Tap any number of creatures you control with total power 2 or more: This Vehicle becomes an artifact creature until end of turn.) mana={3} type=Artifact @@ -92952,6 +92965,17 @@ mana={1}{W} type=Sorcery [/card] [card] +name=Revoke Privileges +target=creature +auto=teach(creature) cantattack +auto=teach(creature) cantblock +auto=teach(creature) cantcrew +text=Enchant creature -- Enchanted creature can't attack, block, or crew Vehicles. +mana={2}{W} +type=Enchantment +subtype=Aura +[/card] +[card] name=Revolutionary Rebuff target=*[-artifact]|stack auto=transforms((,newability[pay[[{2}]] name(pay 2 mana) donothing?fizzle])) forever @@ -104820,7 +104844,7 @@ toughness=2 [card] name=Sky Skiff abilities=flying -auto={T(other creature[power>=1]|myBattlefield)}:name(crew 1 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0} +auto={crew(other creature[power>=1]|myBattlefield)}:name(crew 1 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~0} text=Flying -- Crew 1 (Tap any number of creatures you control with total power 1 or more: This Vehicle becomes an artifact creature until end of turn.) mana={2} type=Artifact @@ -105327,9 +105351,9 @@ name=Skysovereign, Consul Flagship abilities=flying auto=damage:3 target(creature,planeswalker|opponentbattlefield) auto=@combat(attacking) source(this):damage:3 target(creature,planeswalker|opponentbattlefield) -auto={T(other creature[power>=3]|myBattlefield)}:name(crew 3 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=2]|myBattlefield)}:name(crew 3 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0} -auto={T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}{T(other creature[power>=1]|myBattlefield)}:name(crew 3 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2} +auto={crew(other creature[power>=3]|myBattlefield)}:name(crew 3 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=3]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~2} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=2]|myBattlefield)}:name(crew 3 [2 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,type(other creature[-tapped;power>=2]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~2} +auto={crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}{crew(other creature[power>=1]|myBattlefield)}:name(crew 3 [3 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~2,compare(crewtotalpower)~morethan~2} text=Flying -- Whenever Skysovereign, Consul Flagship enters the battlefield or attacks, it deals 3 damage to target creature or planeswalker an opponent controls. -- Crew 3 (Tap any number of creatures you control with total power 3 or more: This Vehicle becomes an artifact creature until end of turn.) mana={5} type=Legendary Artifact @@ -106261,7 +106285,7 @@ toughness=3 name=Smuggler's Copter abilities=flying auto=@combat(attacking,blocking) source(this):may draw:1 controller && ability$!reject notatarget(*|myhand)!$ controller -auto={T(other creature[power>=1]|myBattlefield)}:name(crew 1 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0} +auto={crew(other creature[power>=1]|myBattlefield)}:name(crew 1 [1 creature]) becomes(Artifact Creature) ueot restriction{type(other creature[-tapped;power>=1]|mybattlefield)~morethan~0,compare(crewtotalpower)~morethan~0} text=Flying -- Whenever Smuggler's Copter attacks or blocks, you may draw a card. If you do, discard a card. -- Crew 1 (Tap any number of creatures you control with total power 1 or more: This Vehicle becomes an artifact creature until end of turn.) mana={2} type=Artifact @@ -108338,6 +108362,17 @@ power=2 toughness=2 [/card] [card] +name=Speedway Fanatic +abilities=haste +crewbonus=haste +text=Haste -- Whenever Speedway Fanatic crews a Vehicle, that Vehicle gains haste until end of turn. +mana={1}{R} +type=Creature +subtype=Human Pilot +power=2 +toughness=1 +[/card] +[card] name=Spell Blast target=*[manacost=prex]|stack auto=fizzle @@ -125843,6 +125878,17 @@ power=1 toughness=1 [/card] [card] +name=Veteran Motorist +crewbonus=1/1 +auto=scry:2 scrycore delayed dontshow donothing scrycoreend scryend +text=When Veteran Motorist enters the battlefield, scry 2. -- Whenever Veteran Motorist crews a Vehicle, that Vehicle gets +1/+1 until end of turn. +mana={R}{W} +type=Creature +subtype=Dwarf Pilot +power=3 +toughness=1 +[/card] +[card] name=Veteran of the Depths auto=@tapped(this):may counter(1/1,1) text=Whenever Veteran of the Depths becomes tapped, you may put a +1/+1 counter on it. @@ -132243,6 +132289,7 @@ toughness=2 name=Withering Boon target=creature|stack auto=fizzle +restriction=compare(lifetotal)~morethan~2 text=As an additional cost to cast Withering Boon, pay 3 life. -- Counter target creature spell. mana={L:3}{1}{B} type=Instant diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 753eb6d59..d5ffd6511 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -875,6 +875,16 @@ private: else intValue = 0; } + else if (s == "crewtotalpower")//crew count total power + { + intValue = 0; + for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j) + { + MTGCardInstance * crew = card->controller()->game->battlefield->cards[j]; + if (crew != card && crew->isCreature() && !crew->isTapped() && !crew->has(Constants::CANTCREW)) + intValue += crew->power; + } + } else if (s == "pancientooze")//Ancient Ooze { intValue = 0; diff --git a/projects/mtg/include/CardPrimitive.h b/projects/mtg/include/CardPrimitive.h index ec32b4c0f..3639496e2 100644 --- a/projects/mtg/include/CardPrimitive.h +++ b/projects/mtg/include/CardPrimitive.h @@ -74,6 +74,9 @@ public: string AICustomCode; void setAICustomCode(const string& value); const string& getAICustomCode() const; + string CrewAbility; + void setCrewAbility(const string& value); + const string& getCrewAbility() const; vectortypes; CardPrimitive(); diff --git a/projects/mtg/include/ExtraCost.h b/projects/mtg/include/ExtraCost.h index 6eca8f69e..b3920a6b6 100644 --- a/projects/mtg/include/ExtraCost.h +++ b/projects/mtg/include/ExtraCost.h @@ -244,7 +244,8 @@ public: class TapTargetCost : public ExtraCost { public: - TapTargetCost(TargetChooser *_tc = NULL); + bool crew; + TapTargetCost(TargetChooser *_tc = NULL, bool crew = false); virtual int isPaymentSet(); virtual int doPay(); virtual TapTargetCost * clone() const; diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index 29a3411fc..23e9f9f78 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -58,6 +58,7 @@ CardPrimitive::CardPrimitive(CardPrimitive * source) setdoubleFaced(source->doubleFaced); setAICustomCode(source->AICustomCode); + setCrewAbility(source->CrewAbility); power = source->power; toughness = source->toughness; restrictions = source->restrictions ? source->restrictions->clone() : NULL; @@ -353,6 +354,17 @@ const string& CardPrimitive::getAICustomCode() const return AICustomCode; } +void CardPrimitive::setCrewAbility(const string& value) +{ + std::transform(CrewAbility.begin(), CrewAbility.end(), CrewAbility.begin(), ::tolower); + CrewAbility = value; +} + +const string& CardPrimitive::getCrewAbility() const +{ + return CrewAbility; +} + void CardPrimitive::setName(const string& value) { name = value; diff --git a/projects/mtg/src/ExtraCost.cpp b/projects/mtg/src/ExtraCost.cpp index 8b43bd422..9e497d0c2 100644 --- a/projects/mtg/src/ExtraCost.cpp +++ b/projects/mtg/src/ExtraCost.cpp @@ -771,8 +771,8 @@ TapTargetCost * TapTargetCost::clone() const return ec; } -TapTargetCost::TapTargetCost(TargetChooser *_tc) - : ExtraCost("Tap Target", _tc) +TapTargetCost::TapTargetCost(TargetChooser *_tc, bool crew) + : ExtraCost("Tap Target", _tc), crew(crew) { } @@ -785,6 +785,13 @@ int TapTargetCost::isPaymentSet() target = NULL; return 0; } + if (crew && target && target->has(Constants::CANTCREW)) + { + tc->removeTarget(target); + target->isExtraCostTarget = false; + target = NULL; + return 0; + } if (target) return 1; return 0; @@ -798,6 +805,20 @@ int TapTargetCost::doPay() { source->storedCard = target->createSnapShot(); _target->tap(); + //crew ability + if(crew) + { + if(_target->getCrewAbility().size()) + { + AbilityFactory af(_target->getObserver()); + MTGAbility * crewAbility = af.parseMagicLine(_target->getCrewAbility(), -1, NULL, source,false,true); + crewAbility->oneShot = true; + crewAbility->canBeInterrupted = false; + crewAbility->target = source; + crewAbility->resolve(); + } + } + //end target = NULL; if (tc) tc->initTargets(); diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index ed7f7e932..25759ae01 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -131,6 +131,7 @@ void MTGCardInstance::copy(MTGCardInstance * card) copiedID = card->copiedID; doubleFaced = data->doubleFaced; AICustomCode = data->AICustomCode; + CrewAbility = data->CrewAbility; origpower = card->origpower;//for flip origtoughness = card->origtoughness;//for flip TokenAndAbility = card->TokenAndAbility;//token andAbility diff --git a/projects/mtg/src/MTGDeck.cpp b/projects/mtg/src/MTGDeck.cpp index ce63bd070..a096209a9 100644 --- a/projects/mtg/src/MTGDeck.cpp +++ b/projects/mtg/src/MTGDeck.cpp @@ -131,9 +131,17 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi } break; - case 'c': //color - if (!primitive) primitive = NEW CardPrimitive(); + case 'c': //crew ability + if (key == "crewbonus") { + if (!primitive) primitive = NEW CardPrimitive(); + { + primitive->setCrewAbility(val); + break; + } + } + else if (!primitive) primitive = NEW CardPrimitive(); + {//color string value = val; std::transform(value.begin(), value.end(), value.begin(), ::tolower); vector values = split(value, ','); @@ -143,8 +151,8 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi primitive->setColor(values[values_i], removeAllOthers); removeAllOthers = 0; } + break; } - break; case 'd'://double faced card /dredge if (key == "doublefaced") { diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index 289c1351f..cd8224178 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -297,6 +297,10 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan { manaCost->addExtraCost(NEW CycleCost(tc)); } + else if(value.substr(0,4) == "crew") + {//tap crew + manaCost->addExtraCost(NEW TapTargetCost(tc,true)); + } else if(value.find("(") != string::npos) { size_t counter_start = value.find("(");