diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 017dd05bd..d51e7f4c5 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -259,16 +259,6 @@ power=2 toughness=2 [/card] [card] -name=Abyssal Persecutor -abilities=flying,trample,cantwin -text=Flying, trample -- You can't win the game and your opponents can't lose the game. -mana={2}{B]{B} -type=Creature -subtype=Demon -power=6 -toughness=6 -[/card] -[card] name=Academy Ruins auto={T}:Add {1} auto={1}{U}{T}:moveTo(mylibrary) target(artifact|mygraveyard) @@ -302,7 +292,7 @@ type=Instant [/card] [card] name=Accursed Centaur -auto=moveTo(mygraveyard) notatarget(creature|myBattlefield) +auto=bury notatarget(creature|myBattlefield) text=When Accursed Centaur enters the battlefield, sacrifice a creature. mana={B} type=Creature @@ -652,7 +642,7 @@ name=Air Servant abilities=flying auto={2}{U}:tap target(creature[flying]) text={2}{U}:Tap target creature with flying. -mana={4}{U} +mana={1}{U}{U} type=Creature subtype=Elemental power=4 @@ -2078,7 +2068,7 @@ toughness=0 [card] name=Arcbound Crusher abilities=trample -auto=@movedTo(other artifact|battlefield):counter(1/1,1) +auto=@movedTo(other artifact|myBattlefield):counter(1/1,1) auto=counter(1/1,1) auto=@movedTo(this|mygraveyard) from(myBattlefield):may thisforeach(counter{1/1.1}) counter(1/1,1) target(creature[artifact]) text=Trample -- Whenever another artifact enters the battlefield, put a +1/+1 counter on Arcbound Crusher. -- Modular 1 (This enters the battlefield with a +1/+1 counter on it. When it's put into a graveyard, you may put its +1/+1 counters on target artifact creature.) @@ -2414,16 +2404,6 @@ mana={6} type=Artifact [/card] [card] -name=Armament Master -auto=thisforeach(equip) lord(other kor|myBattlefield) 2/2 -text=Other Kor creatures you control get +2/+2 for each Equipment attached to Armament Master. -mana={W}{W} -type=Creature -subtype=Kor Soldier -power=2 -toughness=2 -[/card] -[card] name=Armed Response target=creature[attacking] auto=foreach(equipment|mybattlefield) damage:1 @@ -2955,17 +2935,6 @@ power=1 toughness=1 [/card] [card] -name=Auriok Glaivemaster -auto=this(equip > 0) 1/1 -auto=this(equip > 0) first strike -text=As long as Auriok Glaivemaster is equipped, it gets +1/+1 and has first strike. -mana={W} -type=Creature -subtype=Human Soldier -power=1 -toughness=1 -[/card] -[card] name=Auriok Salvagers auto={1}{W}:moveTo(myhand) target(artifact[manacost<=1]|mygraveyard) text={1}{W}: Return target artifact card with converted mana cost 1 or less from your graveyard to your hand. @@ -3348,20 +3317,6 @@ power=2 toughness=2 [/card] [card] -name=Azorius Herald -abilities=unblockable -other={1}{W}{U} -auto=alternative 99/99 -auto=draw:1 -auto=-99/-99 -text=Azorius Herald is unblockable. -- When Azorius Herald enters the battlefield, you gain 4 life. -- When Azorius Herald enters the battlefield, sacrifice it unless {U} was spent to cast it. -mana={2}{W} -type=Creature -subtype=Spirit -power=2 -toughness=1 -[/card] -[card] name=Azorius Signet auto={1}{T}:Add {W}{U} text={1}, {T}: Add {W}{U} to your mana pool. @@ -3479,7 +3434,7 @@ toughness=2 [/card] [card] name=Balduvian Dead -auto={2}{R}{E(creature|mygraveyard):token(graveborn,creature zombie,3/1,blackred,treason,unearth,haste) +auto={2}{R}{E(creature|mygraveyard):token(3066111111) text={2}{R}, Exile a creature card from your graveyard: Put a 3/1 black and red Graveborn creature token with haste onto the battlefield. Sacrifice it at the beginning of the next end step. mana={3}{B} type=Creature @@ -6041,16 +5996,6 @@ power=2 toughness=2 [/card] [card] -name=Boros Fury-Shield -target=creature[attacking;blocking] -other={1}{W}{R} -auto=0/0 && fog(mytgt) oneshot -auto=alternative damage:p targetcontroller -text=Prevent all combat damage that would be dealt by target attacking or blocking creature this turn. If {R} was spent to cast Boros Fury-Shield, it deals damage to that creature's controller equal to the creature's power. -mana={2}{W} -type=Instant -[/card] -[card] name=Boros Garrison auto=tap auto=moveto(ownerhand) notatarget(land|myBattlefield) @@ -6576,7 +6521,7 @@ power=2 toughness=2 [/card] [card] -name=Brindle Boar +name=Brindle Boa auto={S}:life:4 text=Sacrifice Brindle Boar: You gain 4 life. mana={2}{G} @@ -9833,21 +9778,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Convalescence -auto=@each my upkeep:this(controllerlife < 11) life:1 -text=At the beginning of your upkeep, if you have 10 or less life, you gain 1 life. -mana={1}{W} -type=Enchantment -[/card] -[card] -name=Convalescent Care -auto=@each my upkeep:this(controllerlife < 6) life:3 -auto=@each my upkeep:this(controllerlife < 6) draw:1 -text=At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card. -mana={1}{W}{W} -type=Enchantment -[/card] -[card] name=Conviction target=creature auto=1/3 @@ -9973,7 +9903,7 @@ power=3 toughness=3 [/card] [card] -name=Corpsehatch +name=Corpse Hatch target=creature[-black] auto=destroy auto=Token(-193507)*2 @@ -11767,16 +11697,6 @@ power=2 toughness=1 [/card] [card] -name=Death's Shadow -auto=thisforeach(controllerlife) -1/-1 -text=Death's Shadow gets -X/-X, where X is your life total. -mana={B} -type=Creature -subtype=Avatar -power=13 -toughness=13 -[/card] -[card] name=Deathbringer Liege auto=lord(creature[black]|myBattlefield) 1/1 other auto=lord(creature[white]|myBattlefield) 1/1 other @@ -13054,17 +12974,6 @@ mana={3}{W} type=Instant [/card] [card] -name=Divinity of Pride -abilities=flying,lifelink -auto=this(controllerlife > 24) 4/4 -text=Flying, lifelink -- Divinity of Pride gets +4/+4 as long as you have 25 or more life. -mana={WB}{WB}{WB}{WB}{WB} -type=Creature -subtype=Spirit Avatar -power=4 -toughness=4 -[/card] -[card] name=Diving Griffin abilities=flying,vigilance text=Flying, vigilance @@ -14029,15 +13938,6 @@ mana={1}{B} type=Sorcery [/card] [card] -name=Dryad's Caress -other={3}{G}{W} -auto=alternative untap all(creature|mybattlefield) -auto=foreach(creature|battlefield) life:1 controller -text=You gain 1 life for each creature on the battlefield. If {W} was spent to cast Dryad's Caress, untap all creatures you control. -mana={4}{G}{G} -type=Instant -[/card] -[card] name=Dryad's Favor target=creature auto=forestwalk @@ -16701,6 +16601,14 @@ type=Enchantment subtype=Aura [/card] [card] +name=Feast of Blood +auto=choice name(2/2 black Zombie creature token) && token(Zombie,Creature Zombie,2/2,black) +auto=choice name(bury target nonblack, nonartifact creature) bury target(creature[-black;-artifact]) +text=Choose one — Put a 2/2 black Zombie creature token onto the battlefield; or destroy target nonblack, nonartifact creature and it can't be regenerated. +mana={3}{B} +type=Instant +[/card] +[card] name=Feast of Flesh target=creature auto=damage:1 @@ -16781,17 +16689,6 @@ mana={1} type=Artifact [/card] [card] -name=Felidar Sovereign -abilities=vigilance,lifelink -auto=@each my upkeep:this(controllerlife > 39) wingame -text=Vigilance, lifelink -- At the beginning of your upkeep, if you have 40 or more life, you win the game. -mana={4}{W}{W} -type=Creature -subtype=Cat Beast -power=4 -toughness=6 -[/card] -[card] name=Femeref Archers auto={T}:damage:4 target(creature[attacking;flying]) text={T}: Femeref Archers deals 4 damage to target attacking creature with flying. @@ -17508,17 +17405,6 @@ text={T}: Add {W} to your mana pool. -- When Flagstones of Trokair is put into a type=Legendary Land [/card] [card] -name=Flame-Kin Zealot -auto=lord(creature|myBattlefield) 1/1 ueot -auto=lord(creature|myBattlefield) haste ueot -text=When Flame-Kin Zealot enters the battlefield, creatures you control get +1/+1 and gain haste until end of turn. -mana={1}{R}{R}{W} -type=Creature -subtype=Elemental Berserker -power=2 -toughness=2 -[/card] -[card] name=Flame Burst target=creature,player auto=Damage:2 @@ -20866,15 +20752,6 @@ power=2 toughness=2 [/card] [card] -name=Golem-Skin Gauntlets -auto={2}:equip -auto=thisforeach(equip) 1/0 -text=Equipped creature gets +1/+0 for each Equipment attached to it. -- Equip {2} ({2}: Attach to target creature you control. Equip only as a sorcery. This card enters the battlefield unattached and stays on the battlefield if the creature leaves.) -mana={1} -type=Artifact -subtype=Equipment -[/card] -[card] name=Golgari Germination auto=@movedto(graveyard) from(creature[-token]|myBattlefield):token(Saproling,creature saproling, 1/1,green) text=Whenever a nontoken creature you control is put into a graveyard from the battlefield, put a 1/1 green Saproling creature token onto the battlefield. @@ -21056,16 +20933,6 @@ power=4 toughness=4 [/card] [card] -name=Graceful Adept -abilities=nomaxhand -text=You have no maximum hand size. -mana={2}{U} -type=Creature -subtype=Human Wizard -power=1 -toughness=3 -[/card] -[card] name=Grafted Skullcap auto=@each my draw:draw:1 auto=@each my end:moveTo(graveyard) all(*|myhand) @@ -21222,6 +21089,17 @@ mana={B} type=Instant [/card] [card] +name=Graveborn Token Balduvian Dead +type=Creature +subtype=Graveborn +auto=@next end:moveTo(exile) +abilities=haste +text=Haste +power=3 +toughness=1 +color=redblack +[/card] +[card] name=Graveborn Muse auto=@each my upkeep:foreach(zombie|myBattlefield) draw:1 auto=@each my upkeep:foreach(zombie|myBattlefield) life:-1 @@ -21743,17 +21621,6 @@ power=2 toughness=2 [/card] [card] -name=Gruul Scrapper -other={2}{R}{G} -auto=alternative haste ueot -text=When Gruul Scrapper enters the battlefield, if {R} was spent to cast Gruul Scrapper, it gains haste until end of turn. -mana={3}{G} -type=Creature -subtype=Human Berserker -power=3 -toughness=2 -[/card] -[card] name=Gruul Signet auto={1}{T}:Add {R}{G} text={1}, {T}: Add {R}{G} to your mana pool. @@ -21865,17 +21732,6 @@ mana={1}{W} type=Instant [/card] [card] -name=Guul Draz Vampire -auto=this(opponentlife < 11) 2/1 -auto=this(opponentlife < 11) intimidate -text=As long as an opponent has 10 or less life, Guul Draz Vampire gets +2/+1 and has intimidate. (It can't be blocked except by artifact creatures and/or creatures that share a color with it.) -mana={B} -type=Creature -subtype=Vampire Rogue -power=1 -toughness=1 -[/card] -[card] name=Guma abilities=protection from blue text=Protection from blue @@ -23133,14 +22989,6 @@ mana={1}{B}{B} type=Instant [/card] [card] -name=Hidetsugu's Second Rite -target=player -auto=this(opponentlife = 10) damage:10 -text=If target player has exactly 10 life, Hidetsugu's Second Rite deals 10 damage to that player. -mana={3}{R} -type=Instant -[/card] -[card] name=High Market auto={T}:Add {1} auto={T}{S(creature|myBattlefield)}:life:1 @@ -25476,7 +25324,7 @@ toughness=5 [card] name=Jedit Ojanen of Efrava abilities=forestwalk -auto=@each my blockers:aslongas(jedit ojanen of efrava[attacking]|myBattlefield) token(Cat Warrior,creature cat warrior, 2/2,green) +auto=@each my blockers:aslongas(jedit ojanen of efrava[attacking]|myBattlefield) token(Cat,creature cat, 2/2,green) auto=@each opponent combatdamage:aslongas(jedit ojanen of efrava[blocking]|myBattlefield) token(Cat,creature cat, 2/2,green) ####Don't change the phase names! text=Forestwalk -- Whenever Jedit Ojanen of Efrava attacks or blocks, put a 2/2 green Cat Warrior creature token with forestwalk onto the battlefield. @@ -27172,17 +27020,6 @@ type=Artifact subtype=Equipment [/card] [card] -name=Kitesail Apprentice -auto=this(equip > 0) flying -auto=this(equip > 0) 1/1 -text=As long as Kitesail Apprentice is equipped, it gets +1/+1 and has flying. -mana={W} -type=Creature -subtype=Kor Soldier -power=1 -toughness=1 -[/card] -[card] name=Kithkin Daggerdare auto={G}{T}:2/2 target(creature[attacking]) text={G}, {T}: Target attacking creature gets +2/+2 until end of turn. @@ -27406,7 +27243,7 @@ name=Kjeldoran Outpost auto=aslongas(plains|mybattlefield) moveto(myhand) notatarget(plains|mybattlefield) oneshot && counter(0/0,-1,payment) auto=moveto(mygraveyard) target(this|mybattlefield) auto=this(counter{0/0.1.payment}<1) {T}:Add{W} -auto=this(counter{0/0.1.payment}<1) {1}{W}{T}:token(Soldier,creature soldier, 1/1,white) +auto=this(counter{0/0.1.payment}<1) {T}:{1}{W}{T}:token(Soldier,creature soldier, 1/1,white) text=If Kjeldoran Outpost would enter the battlefield, sacrifice a Plains instead. If you do, put Kjeldoran Outpost onto the battlefield. If you don't, put it into its owner's graveyard. -- {T}: Add {W} to your mana pool. -- {1}{W}, {T}: Put a 1/1 white Soldier creature token onto the battlefield. type=Land [/card] @@ -27731,16 +27568,6 @@ power=2 toughness=2 [/card] [card] -name=Kor Duelist -auto=this(equip > 0) double strike -text=As long as Kor Duelist is equipped, it has double strike. (It deals both first-strike and regular combat damage.) -mana={W} -type=Creature -subtype=Kor Soldier -power=1 -toughness=1 -[/card] -[card] name=Kor Firewalker abilities=protection from red auto=@movedTo(*[red]|stack):may life:1 controller @@ -27752,15 +27579,8 @@ power=2 toughness=2 [/card] [card] -name=Kor Haven -auto={T}:Add {1} -auto={1}{W}{T}:0/0 target(creature[attacking]) && fog from(mytgt) oneshot -text={T}: Add {1} to your mana pool. -- {1}{W}, {T}: Prevent all combat damage that would be dealt by target attacking creature this turn. -type=Legendary Land -[/card] -[card] name=Kor Hookmaster -auto=frozen target(creature) && tap +auto=tap && frozen target(creature) text=When Kor Hookmaster enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. mana={2}{W} type=Creature @@ -27769,16 +27589,6 @@ power=2 toughness=2 [/card] [card] -name=Kor Line-Slinger -auto={T}:tap target(creature[power<=3]) -text={T}:Tap target creature with power 3 or less. -mana={1}{W} -type=Creature -subtype=Kor Scout -power=0 -toughness=1 -[/card] -[card] name=Kor Sanctifiers kicker={W} auto=kicker destroy target(artifact,enchantment) @@ -28737,17 +28547,6 @@ mana={3} type=Artifact [/card] [card] -name=Leonin Den-Guard -auto=this(equip > 0) 1/1 -auto=this(equip > 0) vigilance -text=As long as Leonin Den-Guard is equipped, it gets +1/+1 and has vigilance. -mana={1}{W} -type=Creature -subtype=Cat Soldier -power=1 -toughness=3 -[/card] -[card] name=Leonin Elder auto=@movedTo(artifact|battlefield):may life:1 text=Whenever an artifact enters the battlefield, you may gain 1 life. @@ -28867,7 +28666,6 @@ auto=@movedTo(*|graveyard):all(trigger) moveTo(exile) text=If Leyline of the Void is in your opening hand, you may begin the game with it on the battlefield. -- If a card would be put into an opponent's graveyard from anywhere, exile it instead. mana={2}{B}{B} type=Enchantment -subtype=Leyline [/card] [card] name=Lhurgoyf @@ -29774,16 +29572,6 @@ power=4 toughness=3 [/card] [card] -name=Lowland Oaf -auto={T}:target(creature[goblin]|mybattlefield) transforms(,treason,flying) && 1/0 -text={T}: Target Goblin creature you control gets +1/+0 and gains flying until end of turn. Sacrifice that creature at the beginning of the next end step. -mana={3}{R} -type=Creature -subtype=Giant Warrior -power=3 -toughness=3 -[/card] -[card] name=Loxodon Anchorite auto={T}:prevent:2 target(creature,player) text={T}: Prevent the next 2 damage that would be dealt to target creature or player this turn. @@ -29835,16 +29623,6 @@ power=3 toughness=3 [/card] [card] -name=Loxodon Punisher -auto=thisforeach(equip) 2/2 -text=Loxodon Punisher gets +2/+2 for each Equipment attached to it. -mana={3}{W} -type=Creature -subtype=Elephant Soldier -power=2 -toughness=2 -[/card] -[card] name=Loxodon Stalwart abilities=Vigilance auto={W}:0/1 @@ -29998,7 +29776,7 @@ power=1 toughness=1 [/card] [card] -name=Lust for War +name=Lust of War target=creature auto=mustattack auto=@tapped(mytgt):damage:3 targetController @@ -33340,16 +33118,6 @@ power=3 toughness=3 [/card] [card] -name=Myr Adapter -auto=thisforeach(equip) 1/1 -text=Myr Adapter gets +1/+1 for each Equipment attached to it. -mana={3} -type=Artifact Creature -subtype=Myr -power=1 -toughness=1 -[/card] -[card] name=Myr Enforcer abilities=affinityartifacts text=Affinity for artifacts (This spell costs {1} less to cast for each artifact you control.) @@ -33869,13 +33637,6 @@ power=5 toughness=3 [/card] [card] -name=Near-Death Experience -auto=@each my upkeep:this(controllerlife = 1) wingame -text=At the beginning of your upkeep, if you have exactly 1 life, you win the game. -mana={2}{W}{W}{W} -type=Enchantment -[/card] -[card] name=Neck Snap target=creature[attacking;blocking] auto=destroy @@ -35116,17 +34877,6 @@ power=5 toughness=4 [/card] [card] -name=Ogre Savant -other={3}{U}{R} -auto=alternative moveTo(ownerhand) target(creature) -text=When Ogre Savant enters the battlefield, if {U} was spent to cast Ogre Savant, return target creature to its owner's hand. -mana={4}{R} -type=Creature -subtype=Ogre Wizard -power=3 -toughness=2 -[/card] -[card] name=Ogre Sentry abilities=defender text=Defender @@ -36330,20 +36080,6 @@ power=2 toughness=3 [/card] [card] -name=Patagia Viper -abilities=flying -other={2}{U}{G} -auto=alternative 99/99 -auto=-99/-99 -auto=token(Snake,Creature Snake,1/1,greenblue)*2 -text=Flying -- When Patagia Viper enters the battlefield, put two 1/1 green and blue Snake creature tokens onto the battlefield. -- When Patagia Viper enters the battlefield, sacrifice it unless {U} was spent to cast it. -mana={3}{G} -type=Creature -subtype=Snake -power=2 -toughness=1 -[/card] -[card] name=Patchwork Gnomes auto={S(*|myhand)}:regenerate text=Discard a card: Regenerate Patchwork Gnomes. @@ -36818,7 +36554,7 @@ abilities=deathtouch auto=kicker lord(this) cantlose ueot auto=@damaged(player) from(this|mybattlefield):wingame controller auto=choice name(Phage enters the Battlefield!!) && wingame opponent && all(this) -cantlose ueot -Text=When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game. Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated. Whenever Phage deals combat damage to a player, that player loses the game. +text=When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game. Whenever Phage deals combat damage to a creature, destroy that creature. It can't be regenerated. Whenever Phage deals combat damage to a player, that player loses the game. mana={3}{B}{B}{B}{B} kicker={0} type=Legendary Creature @@ -37757,20 +37493,6 @@ power=0 toughness=0 [/card] [card] -name=Plaxmanta -abilities=flash -other={U}{G} -auto=lord(creature|myBattlefield) shroud ueot -auto=-99/-99 -auto=alternative 99/99 -text=Flash -- When Plaxmanta enters the battlefield, creatures you control gain shroud until end of turn. (They can't be the targets of spells or abilities.) -- When Plaxmanta enters the battlefield, sacrifice it unless {G} was spent to cast it. -mana={1}{U} -type=Creature -subtype=Beast -power=2 -toughness=2 -[/card] -[card] name=Pledge of Loyalty target=creature auto=aslongas(*[red]|mybattlefield) protection from red @@ -38560,7 +38282,7 @@ power=0 toughness=1 [/card] [card] -name=Punctute Blast +name=Puncture Blast abilities=wither target=creature,player auto=damage:3 @@ -38578,7 +38300,7 @@ mana={1}{R} type=Instant [/card] [card] -name=Puncturing Light +name=Puncture Light target=creature[attacking;blocking;power<=3] auto=destroy text=Destroy target attacking or blocking creature with power 3 or less. @@ -38774,7 +38496,7 @@ toughness=1 [/card] [card] name=Pyretic Ritual -auto=add{R}{R}{R} +auto={R}{R}{R} text=Add {R}{R}{R} to your mana pool. mana={1}{R} type=Instant @@ -39502,18 +39224,6 @@ power=2 toughness=2 [/card] [card] -name=Raksha Golden Cub -abilities=vigilance -auto=this(equip > 0) lord(creature[cat]|myBattlefield) 2/2 -auto=this(equip > 0) lord(creature[cat]|myBattlefield) double strike -text=Vigilance -- As long as Raksha Golden Cub is equipped, Cat creatures you control get +2/+2 and have double strike. -mana={5}{W}{W} -type=Legendary Creature -subtype=Cat Soldier -power=3 -toughness=4 -[/card] -[card] name=Rally auto=lord(creature[blocking]) 1/1 text=Blocking creatures get +1/+1 until end of turn. @@ -39929,14 +39639,6 @@ power=3 toughness=4 [/card] [card] -name=Razor Pendulum -auto=@each my end:this(controllerlife < 6) damage:2 controller -auto=@each opponent end:this(opponentlife < 6) damage:2 opponent -text=At the beginning of each player's end step, if that player has 5 or less life, Razor Pendulum deals 2 damage to him or her. -mana={4} -type=Artifact -[/card] -[card] name=Razormane Masticore auto=first strike auto=upcost[{S(*|myhand)}] moveTo(graveyard) @@ -40461,13 +40163,6 @@ power=2 toughness=2 [/card] [card] -name=Reliquary Tower -abilities=nomaxhand -auto={T}:Add{1} -text=You have no maximum hand size. -- {T}: Add {1} to your mana pool. -type=Land -[/card] -[card] name=Reminisce target=player # auto=moveTo(ownerlibrary) all(*|ownergraveyard) @@ -40742,7 +40437,7 @@ toughness=1 [card] name=Restrain target=creature[attacking] -auto=0/0 && fog from(mytgt) oneshot +auto=preventAllCombatDamage from(mytgt) ueot auto=draw:1 controller text=Prevent all combat damage that would be dealt by target attacking creature this turn. -- Draw a card. mana={2}{W} @@ -41009,17 +40704,6 @@ power=1 toughness=4 [/card] [card] -name=Ribbons of Night -target=creature -other={3}{U}{B} -auto=damage:4 -auto=life:4 controller -auto=alternative draw:1 controller -text=Ribbons of Night deals 4 damage to target creature and you gain 4 life. If {U} was spent to cast Ribbons of Night, draw a card. -mana={4}{B} -type=Sorcery -[/card] -[card] name=Ribbons of the Reikai auto=foreach(spirit|myBattlefield):draw:1 controller text=Draw a card for each Spirit you control. @@ -41539,16 +41223,6 @@ mana={X}{R} type=Sorcery [/card] [card] -name=Rolling Spoil -target=land -other={1}{B}{G}{G} -auto=destroy -auto=alternative -1/-1 all(creature) -text=Destroy target land. If {B} was spent to cast Rolling Spoil, all creatures get -1/-1 until end of turn. -mana={2}{G}{G} -type=Sorcery -[/card] -[card] name=Rolling Stones auto=lord(wall) -defender text=Wall creatures can attack as though they didn't have defender. @@ -42105,16 +41779,6 @@ power=1 toughness=3 [/card] [card] -name=Ruthless Cullblade -auto=this(opponentlife < 11) 2/1 -text=Ruthless Cullblade gets +2/+1 as long as an opponent has 10 or less life. -mana={1}{B} -type=Creature -subtype=Vampire Warrior -power=2 -toughness=1 -[/card] -[card] name=Ryusei, the Falling Star abilities=flying auto=@movedTo(this|graveyard) from(battlefield):damage:5 all(creature[-flying]) @@ -42655,7 +42319,6 @@ subtype=Saproling power=1 toughness=1 color=green -id=-1924 [/card] [card] name=Sapseep Forest @@ -43362,7 +43025,6 @@ auto=@each myupkeep:aslongas(land|mybattlefield) counter(1/1,4) >4 text=At the beginning of your upkeep, if you control five or more lands, put four +1/+1 counters on Scute Mob. type=Creature subtype=Insect -mana={G} power=1 toughness=1 [/card] @@ -43680,16 +43342,6 @@ power=2 toughness=2 [/card] [card] -name=Seed Spark -target=artifact,enchantment -other={2}{G}{W} -auto=destroy -auto=alternative token(Saproling,Creature Saproling,1/1,green)*2 -text=Destroy target artifact or enchantment. If {G} was spent to cast Seed Spark, put two 1/1 green Saproling creature tokens onto the battlefield. -mana={3}{W} -type=Instant -[/card] -[card] name=Seedborn Muse auto=@each opponent untap:untap all(*|myBattlefield) text=Untap all permanents you control during each other player's untap step. @@ -44085,29 +43737,6 @@ power=4 toughness=4 [/card] [card] -name=Serra Ascendant -abilities=lifelink -auto=this(controllerlife >29) 5/5 -auto=this(controllerlife >29) flying -text=Lifelink -- As long as you have 30 or more life, Serra Ascendant gets +5/+5 and has flying. -mana={W} -type=Creature -subtype=Human Monk -power=1 -toughness=1 -[/card] -[card] -name=Serra Avatar -auto=thisforeach(controllerlife) 1/1 -autograveyard=moveTo(ownerlibrary) && shuffle -text=Serra Avatar's power and toughness are each equal to your life total. -- When Serra Avatar is put into a graveyard from anywhere, shuffle it into its owner's library. -mana={4}{W}{W}{W} -type=Creature -subtype=Avatar -power=* -toughness=* -[/card] -[card] name=Serra Aviary auto=lord(creature[flying]) 1/1 auto=@movedTo(enchantment[world]|battlefield):bury @@ -45276,7 +44905,7 @@ type=Sorcery [/card] [card] name=Silence -auto=nospells opponent +auto=nospell opponent text=Your opponents can't cast spells this turn. (Spells cast before this resolves are unaffected.) mana={W} type=Instant @@ -46047,17 +45676,6 @@ text={1}, {T}: Add {W}{U} to your mana pool. type=Land [/card] [card] -name=Skyhunter Cub -auto=this(equip > 0) 1/1 -auto=this(equip > 0) flying -text=As long as Skyhunter Cub is equipped, it gets +1/+1 and has flying. -mana={2}{W} -type=Creature -subtype=Cat Knight -power=2 -toughness=2 -[/card] -[card] name=Skyhunter Patrol abilities=flying,first strike text=Flying, first strike (This creature can't be blocked except by creatures with flying or reach, and it deals combat damage before creatures without first strike.) @@ -47415,7 +47033,7 @@ mana={3}{R}{R}{R} type=Instant [/card] [card] -name=Soulbound Guardians +name=Soulbound Guardian abilities=defender,flying text=Defender, Flying mana={4}{W} @@ -47783,13 +47401,6 @@ mana={U} type=Instant [/card] [card] -name=Spellbook -abilities=nomaxhand -text=You have no maximum hand size. -mana={0} -type=Artifact -[/card] -[card] name=Spellgorger Barbarian auto=discard:1 controller auto=@movedTo(this|graveyard,exile,library,hand) from(battlefield):draw:1 controller @@ -49007,17 +48618,6 @@ mana={2} type=Artifact [/card] [card] -name=Steamcore Weird -other={2}{U}{R} -auto=alternative damage:2 target(creature,player) -text=When Steamcore Weird enters the battlefield, if {R} was spent to cast Steamcore Weird, it deals 2 damage to target creature or player. -mana={3}{U} -type=Creature -subtype=Weird -power=1 -toughness=3 -[/card] -[card] name=Steel Golem abilities=cantcastcreature text=You can't cast creature spells. @@ -49079,7 +48679,7 @@ type=Instant [/card] [card] name=Steelshaper Apprentice -auto={H}{W}{T}:moveTo(myhand) target(equipment|mylibrary) +auto={W}{T}:moveTo(ownerhand) all(this) && moveTo(myhand) target(equipment|mylibrary) text={W}, {T}, Return Steelshaper Apprentice to its owner's hand: Search your library for an Equipment card, reveal that card, and put it into your hand. Then shuffle your library. mana={2}{W}{W} type=Creature @@ -50647,7 +50247,7 @@ type=Instant [/card] [card] name=Sylvan Ranger -auto=may moveTo(myhand) target(land[basic]|mylibrary) +auto=may moveTo(myhand) target(land[basic]|mylibrary) && tap text=When Sylvan Ranger enters the battlefield, you may search your library for a basic land card, reveal it, and put it into your hand. If you do, shuffle your library. mana={1}{G} type=Creature @@ -51763,13 +51363,6 @@ mana={1}{B} type=Instant [/card] [card] -name=Test of Endurance -auto=@each my upkeep:this(controllerlife > 49) wingame -text=At the beginning of your upkeep, if you have 50 or more life, you win the game. -mana={2}{W}{W} -type=Enchantment -[/card] -[card] name=Testament of Faith auto={X}:becomes(Creature Wall,*/*,defender) ueot && thisforeach(X) all(this) 1/1 text={X}: Testament of Faith becomes an X/X Wall creature with defender until end of turn. It's still an enchantment. @@ -52906,7 +52499,7 @@ auto=moveto(mygraveyard) all(*|myhand) auto=moveto(mylibrary) all(*|mygraveyard) && shuffle auto=draw:7 controller text=Each player shuffles his or her hand and graveyard into his or her library, then draws seven cards. Exile Time Reversal. -mana={3}{U}{U} +mana={2}{U} type=Sorcery [/card] [card] @@ -52933,17 +52526,6 @@ power=3 toughness=3 [/card] [card] -name=Tin Street Hooligan -other={R}{G} -auto=alternative destroy target(artifact) -text=When Tin Street Hooligan enters the battlefield, if {G} was spent to cast Tin Street Hooligan, destroy target artifact. -mana={1}{R} -type=Creature -subtype=Goblin Rogue -power=2 -toughness=1 -[/card] -[card] name=Tinder Farm auto=tap auto={T}:Add {G} @@ -53243,17 +52825,6 @@ power=2 toughness=2 [/card] [card] -name=Torch Slinger -kicker={1}{R} -auto=kicker damage:2 target(creature) -text=Kicker {1}{R} (You may pay an additional {1}{R} as you cast this spell.) -- When Torch Slinger enters the battlefield, if it was kicked, it deals 2 damage to target creature. -mana={2}{R} -type=Creature -subtype=Goblin Shaman -power=2 -toughness=2 -[/card] -[card] name=Torch Song auto=@each my upkeep:may counter(0/0,1,Verse) auto={2}{R}{S}:thisforeach(counter{0/0.1.Verse}) damage:1 target(creature,player) @@ -53341,9 +52912,9 @@ mana={B} type=Enchantment [/card] [card] -name=Totem-Guide Hartbeest +name=Totem-Guard Hartbeest auto=moveTo(myhand) target(aura|myLibrary) -text=When Totem-Guide Hartbeest enters the battlefield, you may search you library for an aura card, reveal it, put it into your hand and shuffle your library. +text=When Totem-Guard Hartbeest enters the battlefield, you may search you library for an aura card, reveal it, put it into your hand and shuffle your library. mana={4}{W} type=Creature subtype=Antelope @@ -55179,16 +54750,6 @@ power=2 toughness=2 [/card] [card] -name=Vampire Lacerator -auto=@each my upkeep:this(opponentlife > 10) life:-1 controller -text=At the beginning of your upkeep, you lose 1 life unless an opponent has 10 or less life. -mana={B} -type=Creature -subtype=Vampire Warrior -power=2 -toughness=2 -[/card] -[card] name=Vampire Nighthawk abilities=flying,deathtouch,lifelink text=Flying -- Deathtouch (Creatures dealt damage by this creature are destroyed. You can divide this creature's combat damage among any of the creatures blocking or blocked by it.) -- Lifelink (Damage dealt by this creature also causes you to gain that much life.) @@ -56047,16 +55608,6 @@ power=6 toughness=6 [/card] [card] -name=Vigor Mortis -target=creature|mygraveyard -other={1}{B}{B}{G} -auto=moveTo(myBattlefield) -auto=alternative counter(1/1) -text=Return target creature card from your graveyard to the battlefield. If {G} was spent to cast Vigor Mortis, that creature enters the battlefield with an additional +1/+1 counter on it. -mana={2}{B}{B} -type=Sorcery -[/card] -[card] name=Village Elder auto={G}{T}{S(forest|myBattlefield)}:regenerate target(creature) text={G}, {T}, Sacrifice a Forest: Regenerate target creature. @@ -57479,7 +57030,7 @@ type=Enchantment [card] name=Warning target=creature[attacking] -auto=0/0 && fog from(mytgt) oneshot +auto=preventAllCombatDamage from(mytgt) ueot text=Prevent all combat damage that would be dealt by target attacking creature this turn. mana={W} type=Instant @@ -59932,7 +59483,7 @@ power=3 toughness=4 [/card] [card] -name=Zof Shade +name=Zof Enforcer auto={2}{B}:2/2 text={2}{B}:Zof Shade gets +2/+2 until end of turn. mana={3}{B} diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index f87e71fed..8d2662ff2 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -36,205 +36,130 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan case 1: end = s.find_first_of("}"); if (end == string::npos){ - state = -1; + state = -1; }else{ - string value = s.substr(start+1, end - 1 - start); - if (value == "u"){ - manaCost->add(Constants::MTG_COLOR_BLUE, 1); - }else if (value == "b"){ - manaCost->add(Constants::MTG_COLOR_BLACK, 1); - }else if (value == "w"){ - manaCost->add(Constants::MTG_COLOR_WHITE, 1); - }else if (value == "g"){ - manaCost->add(Constants::MTG_COLOR_GREEN, 1); - }else if (value == "r"){ - manaCost->add(Constants::MTG_COLOR_RED, 1); - }else if (value == "x"){ - manaCost->x(); - }else if (value == "t"){ - //Tap is handled outside of Manacost - }else if (value[0] == 's'){ - //sacrifice - OutputDebugString("Sacrifice\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW SacrificeCost(tc)); - //tap cost - }else if (value[0] == 't'){ - //tap - OutputDebugString("Tap\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW TapTargetCost(tc)); - //tapcost - //exile cost - }else if (value[0] == 'e'){ - //tap - OutputDebugString("Exile\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW ExileTargetCost(tc)); -/*--------------------------------- */ - //bounce cost - }else if (value[0] == 'h'){ - OutputDebugString("Bounce\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW BounceTargetCost(tc)); -//--------------------------------- + string value = s.substr(start+1, end - 1 - start); - //life cost - }else if (value[0] == 'l'){ - //tap - - OutputDebugString("Life\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW LifeCost(tc)); - //end life cost - //----------------------------------- - //DiscardRandom cost - }else if (value[0] == 'd'){ - //tap - OutputDebugString("DiscardRandom\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW DiscardRandomCost(tc)); -//------------------------------------- + if (value == "u") { + manaCost->add(Constants::MTG_COLOR_BLUE, 1); + } else if (value == "b") { + manaCost->add(Constants::MTG_COLOR_BLACK, 1); + } else if (value == "w") { + manaCost->add(Constants::MTG_COLOR_WHITE, 1); + } else if (value == "g") { + manaCost->add(Constants::MTG_COLOR_GREEN, 1); + } else if (value == "r") { + manaCost->add(Constants::MTG_COLOR_RED, 1); - //hand to library cost - }else if (value[0] == 'q'){ - OutputDebugString("ToLibrary\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW ToLibraryCost(tc)); + } else { - //Millyourself as a cost - }else if (value[0] == 'm'){ - OutputDebugString("Mill\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW MillCost(tc)); + //Parse target for extraCosts + TargetChooserFactory tcf; + TargetChooser * tc = NULL; + size_t target_start = value.find("("); + size_t target_end = value.find(")"); + if (target_start!=string::npos && target_end!=string::npos){ + string target = value.substr(target_start+1, target_end-1 - target_start); + tc = tcf.createTargetChooser(target,c); + } - //Mill to exile yourself as a cost - }else if (value[0] == 'z'){ - OutputDebugString("MillExile\n"); - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = value.find("("); - size_t target_end = value.find(")"); - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW MillExileCost(tc)); - - }else if (value[0] == 'c'){ - //Counters - OutputDebugString("Counter\n"); - size_t counter_start = value.find("("); - size_t counter_end = value.find(")", counter_start); - AbilityFactory abf; - string counterString = value.substr(counter_start+1,counter_end-counter_start-1); - Counter * counter = abf.parseCounter(counterString,c); - size_t separator = value.find(",",counter_start); - size_t separator2 = string::npos; - if (separator != string::npos) { - separator2 = value.find(",",separator + 1); - } - TargetChooserFactory tcf; - TargetChooser * tc = NULL; - size_t target_start = string::npos; - if (separator2 != string::npos) { - target_start = value.find(",",separator2+1); - } - size_t target_end = counter_end; - if (target_start!=string::npos && target_end!=string::npos){ - string target = value.substr(target_start+1, target_end-1 - target_start); - tc = tcf.createTargetChooser(target,c); - } - manaCost->addExtraCost(NEW CounterCost(counter,tc)); - }else{ - int intvalue = atoi(value.c_str()); - int colors[2]; - int values[2]; - if (intvalue < 10 && value.size() > 1){ - for (int i = 0; i < 2; i++){ - char c = value[i]; - if (c >='0' && c <='9'){ - colors[i] = Constants::MTG_COLOR_ARTIFACT; - values[i] = c - '0'; - }else{ - for (int j = 0; j < Constants::MTG_NB_COLORS; j++){ - if (c == Constants::MTGColorChars[j]){ - colors[i] = j; - values[i] = 1; - } - } - } - } - manaCost->addHybrid(colors[0], values[0], colors[1], values[1]); - }else{ - manaCost->add(Constants::MTG_COLOR_ARTIFACT, intvalue); - } - } - s = s.substr(end + 1); - state = 0; + //switch on the first letter. If two costs share their first letter, add an "if" within the switch + switch(value[0]) { + case 'x': + manaCost->x(); + break; + case 't': //Tap + if (value == "t"){ + //default Tap is handled outside of Manacost + } else { + manaCost->addExtraCost(NEW TapTargetCost(tc)); + } + break; + case 's': //Sacrifice + manaCost->addExtraCost(NEW SacrificeCost(tc)); + break; + case 'e': //Exile + manaCost->addExtraCost(NEW ExileTargetCost(tc)); + break; + case 'h': //bounce + manaCost->addExtraCost(NEW BounceTargetCost(tc)); + break; + case 'l': //Life cost + manaCost->addExtraCost(NEW LifeCost(tc)); + break; + case 'd': //DiscardRandom cost + manaCost->addExtraCost(NEW DiscardRandomCost(tc)); + break; + case 'q': //Hand To Library Cost + manaCost->addExtraCost(NEW ToLibraryCost(tc)); + break; + case 'm': //Mill yourself as a cost + manaCost->addExtraCost(NEW MillCost(tc)); + break; + case 'z': //Mill to exile yourself as a cost + manaCost->addExtraCost(NEW MillExileCost(tc)); + break; + case 'c': //Counters + { + size_t counter_start = value.find("("); + size_t counter_end = value.find(")", counter_start); + AbilityFactory abf; + string counterString = value.substr(counter_start+1,counter_end-counter_start-1); + Counter * counter = abf.parseCounter(counterString,c); + size_t separator = value.find(",",counter_start); + size_t separator2 = string::npos; + if (separator != string::npos) { + separator2 = value.find(",",separator + 1); + } + SAFE_DELETE(tc); + size_t target_start = string::npos; + if (separator2 != string::npos) { + target_start = value.find(",",separator2+1); + } + size_t target_end = counter_end; + if (target_start!=string::npos && target_end!=string::npos){ + string target = value.substr(target_start+1, target_end-1 - target_start); + tc = tcf.createTargetChooser(target,c); + } + manaCost->addExtraCost(NEW CounterCost(counter,tc)); + break; + } + default: //uncolored cost and hybrid costs + { + int intvalue = atoi(value.c_str()); + int colors[2]; + int values[2]; + if (intvalue < 10 && value.size() > 1){ + for (int i = 0; i < 2; i++){ + char c = value[i]; + if (c >='0' && c <='9'){ + colors[i] = Constants::MTG_COLOR_ARTIFACT; + values[i] = c - '0'; + }else{ + for (int j = 0; j < Constants::MTG_NB_COLORS; j++){ + if (c == Constants::MTGColorChars[j]){ + colors[i] = j; + values[i] = 1; + } + } + } + } + manaCost->addHybrid(colors[0], values[0], colors[1], values[1]); + }else{ + manaCost->add(Constants::MTG_COLOR_ARTIFACT, intvalue); + } + break; + } + } + } + s = s.substr(end + 1); + state = 0; } break; default: break; } } - return manaCost; } @@ -419,20 +344,17 @@ int ManaCost::addHybrid(int c1, int v1, int c2, int v2){ int ManaCost::addExtraCost(ExtraCost * _cost){ if (!extraCosts) extraCosts = NEW ExtraCosts(); extraCosts->costs.push_back(_cost); - OutputDebugString("Adding Extra cost\n"); return 1; } int ManaCost::isExtraPaymentSet(){ if (!extraCosts) return 1; - OutputDebugString("Checking costs\n"); return extraCosts->isPaymentSet(); } int ManaCost::canPayExtra(){ if (!extraCosts) return 1; - OutputDebugString("Checking costs for payability\n"); return extraCosts->canPay(); }