From e097d3834720524d9353a5a6ef5a2dfc298124c6 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 17 Sep 2015 18:39:33 +0800 Subject: [PATCH] Updated CDA cards --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 230 ++++++++----------- projects/mtg/include/AllAbilities.h | 57 ++++- 2 files changed, 157 insertions(+), 130 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 79db499c3..b7ef62287 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2,7 +2,7 @@ #Please keep these card alphabetized, and try to have the "name=" line at the top of each card [card] name=Aeon Chronicler -auto=phandcount/phandcount nonstatic +auto=phandcount/phandcount cdaactive autoexile=@counterremoved(0/0,1,Time) from(sourcecard) suspended:draw:1 suspend(0)={X}{3}{U} text=Aeon Chronicler's power and toughness are each equal to the number of cards in your hand. -- Suspend X - {X}{3}{U}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{3}{U} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.) -- Whenever a time counter is removed from Aeon Chronicler while it's exiled, draw a card. @@ -867,7 +867,7 @@ type=Instant [/card] [card] name=Adamaro, First to Desire -auto=foreach(*|opponenthand) 1/1 +auto=type:*:opponenthand/type:*:opponenthand cdaactive text=Adamaro, First to Desire's power and toughness are each equal to the number of cards in the hand of the opponent with the most cards in hand. mana={1}{R}{R} type=Legendary Creature @@ -1464,7 +1464,7 @@ subtype=Ajani [/card] [card] name=Avatar Token -auto=thisforeach(controllerlife) 1/1 +auto=controllerlife/controllerlife cdaactive type=Creature subtype=Avatar power=* @@ -2287,7 +2287,7 @@ toughness=2 [card] name=Altar Golem abilities=trample,doesnotuntap -auto=foreach(creature|battlefield) 1/1 +auto=type:creature:battlefield/type:creature:battlefield cdaactive auto={T(creature|myBattlefield)}{T(creature|myBattlefield)}{T(creature|myBattlefield)}{T(creature|myBattlefield)}{T(creature|myBattlefield)}:untap text=Trample -- Altar Golem's power and toughness are each equal to the number of creatures on the battlefield. -- Altar Golem doesn't untap during your untap step. -- Tap five untapped creatures you control: Untap Altar Golem. mana={7} @@ -2853,22 +2853,7 @@ toughness=3 [/card] [card] name=Ancient Ooze -auto=foreach(other creature[manacost=1]|mybattlefield) 1/1 -auto=foreach(other creature[manacost=2]|mybattlefield) 2/2 -auto=foreach(other creature[manacost=3]|mybattlefield) 3/3 -auto=foreach(other creature[manacost=4]|mybattlefield) 4/4 -auto=foreach(other creature[manacost=5]|mybattlefield) 5/5 -auto=foreach(other creature[manacost=6]|mybattlefield) 6/6 -auto=foreach(other creature[manacost=7]|mybattlefield) 7/7 -auto=foreach(other creature[manacost=8]|mybattlefield) 8/8 -auto=foreach(other creature[manacost=9]|mybattlefield) 9/9 -auto=foreach(other creature[manacost=10]|mybattlefield) 10/10 -auto=foreach(other creature[manacost=11]|mybattlefield) 11/11 -auto=foreach(other creature[manacost=12]|mybattlefield) 12/12 -auto=foreach(other creature[manacost=13]|mybattlefield) 13/13 -auto=foreach(other creature[manacost=14]|mybattlefield) 14/14 -auto=foreach(other creature[manacost=15]|mybattlefield) 15/15 -auto=foreach(other creature[manacost=16]|mybattlefield) 16/16 +auto=pancientooze/pancientooze cdaactive text=Ancient Ooze's power and toughness are each equal to the total converted mana cost of other creatures you control. mana={5}{G}{G} type=Creature @@ -7909,7 +7894,7 @@ toughness=2 [card] name=Battle Squadron abilities=flying -auto=foreach(creature|myBattlefield) 1/1 +auto=type:creature:myBattlefield/type:creature:myBattlefield cdaactive text=Flying -- Battle Squadron's power and toughness are each equal to the number of creatures you control. mana={3}{R}{R} type=Creature @@ -8222,7 +8207,7 @@ type=Enchantment [/card] [card] name=Beast of Burden -auto=foreach(creature|Battlefield) 1/1 +auto=type:creature:Battlefield/type:creature:Battlefield cdaactive text=Beast of Burden's power and toughness are each equal to the number of creatures on the battlefield. mana={6} type=Artifact Creature @@ -8512,7 +8497,7 @@ toughness=2 [/card] [card] name=Benalish Commander -auto=type:soldier:mybattlefield/type:soldier:mybattlefield nonstatic +auto=type:soldier:mybattlefield/type:soldier:mybattlefield cdaactive autoexile=@counterremoved(0/0,1,Time) from(sourcecard) suspended:token(Soldier,Creature Soldier,1/1,white) suspend(0)={X}{W}{W} text=Benalish Commander's power and toughness are each equal to the number of Soldiers you control. -- Suspend X - {X}{W}{W}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{W}{W} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.) -- Whenever a time counter is removed from Benalish Commander while it's exiled, put a 1/1 white Soldier creature token onto the battlefield. @@ -11356,7 +11341,7 @@ toughness=2 [/card] [card] name=Boneyard Wurm -auto=foreach(creature|mygraveyard) 1/1 +auto=type:creature:mygraveyard/type:creature:mygraveyard cdaactive text=Boneyard Wurm's power and toughness are each equal to the number of creature cards in your graveyard. mana={1}{G} type=Creature @@ -12639,7 +12624,7 @@ toughness=4 [card] name=Broodstar abilities=affinityartifacts,flying -auto=foreach(artifact|mybattlefield) 1/1 +auto=type:artifact:mybattlefield/type:artifact:mybattlefield cdaactive text=Affinity for artifacts (This spell costs {1} less to cast for each artifact you control.) -- Flying -- Broodstar's power and toughness are each equal to the number of artifacts you control. mana={8}{U}{U} type=Creature @@ -13633,6 +13618,7 @@ subtype=Elf power=2 toughness=2 [/card] +#chosentype and chosencolor not compatible with cdaactive... [card] name=Caller of the Hunt auto=chooseatype foreach(creature[chosentype]|battlefield) 1/1 chooseend @@ -13788,7 +13774,7 @@ type=Sorcery [card] name=Cantivore abilities=vigilance -auto=foreach(enchantment|graveyard) 1/1 +auto=type:enchantment:graveyard/type:enchantment:graveyard cdaactive text=Vigilance -- Cantivore's power and toughness are each equal to the number of enchantment cards in all graveyards. mana={1}{W}{W} type=Creature @@ -15399,7 +15385,11 @@ toughness=4 [/card] [card] name=Chameleon Spirit -auto=chooseacolor foreach(*[chosencolor]|opponentBattlefield) 1/1 chooseend +auto=choice name(green) activate type:*[green]:opponentBattlefield/type:*[green]:opponentBattlefield cdaactive +auto=choice name(red) activate type:*[red]:opponentBattlefield/type:*[red]:opponentBattlefield cdaactive +auto=choice name(blue) activate type:*[blue]:opponentBattlefield/type:*[blue]:opponentBattlefield cdaactive +auto=choice name(white) activate type:*[white]:opponentBattlefield/type:*[white]:opponentBattlefield cdaactive +auto=choice name(black) activate type:*[black]:opponentBattlefield/type:*[black]:opponentBattlefield cdaactive text=As Chameleon Spirit enters the battlefield, choose a color. -- Chameleon Spirit's power and toughness are each equal to the number of permanents of the chosen color your opponents control. mana={3}{U} type=Creature @@ -17666,7 +17656,7 @@ type=Instant [card] name=Cognivore abilities=flying -auto=foreach(instant|graveyard) 1/1 +auto=type:instant:graveyard/type:instant:graveyard cdaactive text=Flying -- Cognivore's power and toughness are each equal to the number of instant cards in all graveyards. mana={6}{U}{U} type=Creature @@ -17686,7 +17676,7 @@ toughness=1 [/card] [card] name=Coiling Woodworm -auto=foreach(forest|battlefield) 1/0 +auto=type:forest:battlefield/1 cdaactive text=Coiling Woodworm's power is equal to the number of Forests on the battlefield. mana={2}{G} type=Creature @@ -19763,7 +19753,7 @@ toughness=4 [card] name=Crowd of Cinders abilities=fear -auto=foreach(*[black]|myBattlefield) 1/1 +auto=type:*[black]:myBattlefield/type:*[black]:myBattlefield cdaactive text=Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) -- Crowd of Cinders's power and toughness are each equal to the number of black permanents you control. mana={3}{B} type=Creature @@ -19968,7 +19958,7 @@ type=Enchantment [/card] [card] name=Crusader of Odric -auto=foreach(creature|mybattlefield) 1/1 +auto=type:creature:mybattlefield/type:creature:mybattlefield cdaactive text=Crusader of Odric's power and toughness are each equal to the number of creatures you control. mana={2}{W} type=Creature @@ -20858,7 +20848,7 @@ subtype=Aura [/card] [card] name=Dakkon Blackblade -auto=foreach(land|myBattlefield) 1/1 +auto=type:land:myBattlefield/type:land:myBattlefield cdaactive text=Dakkon Blackblade's power and toughness are each equal to the number of lands you control. mana={2}{W}{U}{U}{B} type=Legendary Creature @@ -20921,7 +20911,7 @@ toughness=1 [/card] [card] name=Dakmor Sorceress -auto=foreach(swamp|myBattlefield) 1/0 +auto=type:swamp:myBattlefield/4 cdaactive text=Dakmor Sorceress's power is equal to the number of Swamps you control. mana={5}{B} type=Creature @@ -21419,7 +21409,7 @@ type=Artifact [card] name=Darksteel Juggernaut abilities=mustattack,indestructible -auto=foreach(artifact|mybattlefield) 1/1 +auto=type:artifact:mybattlefield/type:artifact:mybattlefield cdaactive text=Darksteel Juggernaut's power and toughness are equal to the number of artifacts you control. -- Darksteel Juggernaut is indestructible and attacks each turn if able. mana={5} type=Artifact Creature @@ -21615,8 +21605,7 @@ toughness=3 [/card] [card] name=Dauntless Dourbark -auto=foreach(forest|myBattlefield) 1/1 -auto=foreach(treefolk|myBattlefield) 1/1 +auto=pdauntless/pdauntless cdaactive auto=aslongas(other treefolk|myBattlefield) trample text=Dauntless Dourbark's power and toughness are each equal to the number of Forests you control plus the number of Treefolk you control. -- Dauntless Dourbark has trample as long as you control another Treefolk. mana={3}{G} @@ -21749,7 +21738,7 @@ toughness=1 [card] name=Dauthi Warlord abilities=shadow -auto=foreach(creature[shadow]|battlefield) 1/0 +auto=type:creature[shadow]:battlefield/1 cdaactive text=Shadow (This creature can block or be blocked by only creatures with shadow.) -- Dauthi Warlord's power is equal to the number of creatures with shadow on the battlefield. mana={1}{B} type=Creature @@ -23831,7 +23820,7 @@ text=Destroy target artifact with converted mana cost X. It can't be regenerated [/card] [card] name=Detritivore -auto=type:land[-basic]:opponentgraveyard/type:land[-basic]:opponentgraveyard nonstatic +auto=type:land[-basic]:opponentgraveyard/type:land[-basic]:opponentgraveyard cdaactive autoexile=@counterremoved(0/0,1,Time) from(sourcecard) suspended:destroy target(land[-basic]) suspend(0)={X}{3}{R} text=Detritivore's power and toughness are each equal to the number of nonbasic land cards in your opponents' graveyards. -- Suspend X - {X}{3}{R}. X can't be 0. (Rather than cast this card from your hand, you may pay {X}{3}{R} and exile it with X time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost. It has haste.) -- Whenever a time counter is removed from Detritivore while it's exiled, destroy target nonbasic land. @@ -25292,7 +25281,7 @@ type=Artifact [card] name=Doubtless One auto=spiritlink -auto=foreach(cleric) 1/1 +auto=type:cleric:battlefield/type:cleric:battlefield cdaactive text=Doubtless One's power and toughness are each equal to the number of Clerics on the battlefield. -- Whenever Doubtless One deals damage, you gain that much life. mana={3}{W} type=Creature @@ -26421,7 +26410,7 @@ toughness=5 [card] name=Drift of the Dead abilities=defender -auto=foreach(land[snow]|myBattlefield) 1/1 +auto=type:land[snow]:myBattlefield/type:land[snow]:myBattlefield cdaactive text=Defender (This creature can't attack.) -- Drift of the Dead's power and toughness are each equal to the number of snow lands you control. mana={3}{B} type=Creature @@ -26781,7 +26770,7 @@ toughness=1 [card] name=Drove of Elves abilities=opponentshroud -auto=foreach(*[green]|myBattlefield) 1/1 +auto=type:*[green]:myBattlefield/type:*[green]:myBattlefield cdaactive text=Drove of Elves's power and toughness are each equal to the number of green permanents you control. -- Drove of Elves can't be the target of spells or abilities your opponents control. mana={3}{G} type=Creature @@ -27132,7 +27121,7 @@ toughness=1 [card] name=Dungrove Elder abilities=opponentshroud -auto=foreach(forest|mybattlefield) 1/1 +auto=type:forest:mybattlefield/type:forest:mybattlefield cdaactive text=Hexproof (This creature can't be the target of spells or abilities your opponents control.) -- Dungrove Elder's power and toughness are each equal to the number of Forests you control. mana={2}{G} type=Creature @@ -28466,7 +28455,7 @@ type=Sorcery name=Elephant T1 type=Creature subtype=Elephant -auto=foreach(creature|mygraveyard) 1/1 +auto=type:creature:mygraveyard/type:creature:mygraveyard cdaactive text=This creature's power and toughness are each equal to the number of creature cards in its controller's graveyard. power=* toughness=* @@ -30000,7 +29989,7 @@ toughness=2 [/card] [card] name=Entropic Specter -auto=foreach(*|opponenthand) 1/1 +auto=type:*:opponenthand/type:*:opponenthand cdaactive auto=@damaged(controller) from(this):ability$!name(discard) target(*|myhand) reject!$ controller auto=@damaged(opponent) from(this):ability$!name(discard) target(*|myhand) reject!$ opponent text=Flying -- As Entropic Specter enters the battlefield, choose an opponent. -- Entropic Specter's power and toughness are each equal to the number of cards in the chosen player's hand. -- Whenever Entropic Specter deals damage to a player, that player discards a card. @@ -31590,7 +31579,7 @@ toughness=1 [card] name=Faerie Swarm abilities=flying -auto=foreach(*[blue]|myBattlefield) 1/1 +auto=type:*[blue]:myBattlefield/type:*[blue]:myBattlefield cdaactive text=Flying -- Faerie Swarm's power and toughness are each equal to the number of blue permanents you control. mana={3}{U} type=Creature @@ -37037,7 +37026,7 @@ type=Instant name=Geist-Honored Monk abilities=vigilance auto=token(Spirit,Creature Spirit,1/1,white,flying)*2 -auto=foreach(creature|mybattlefield) 1/1 +auto=type:creature:mybattlefield/type:creature:mybattlefield cdaactive text=Vigilance -- Geist-Honored Monk's power and toughness are each equal to the number of creatures you control. -- When Geist-Honored Monk enters the battlefield, put two 1/1 white Spirit creature tokens with flying onto the battlefield. mana={3}{W}{W} type=Creature @@ -44009,7 +43998,7 @@ subtype=Arcane [card] name=Heedless One abilities=trample -auto=foreach(elf) 1/1 +auto=type:elf:battlefield/type:elf:battlefield cdaactive text=Trample -- Heedless One's power and toughness are each equal to the number of Elves on the battlefield. mana={3}{G} type=Creature @@ -48996,7 +48985,7 @@ toughness=4 [/card] [card] name=Jagged-Scar Archers -auto=foreach(elf|myBattlefield) 1/1 +auto=type:elf:myBattlefield/type:elf:myBattlefield cdaactive auto={T}:target(creature[flying]) dynamicability text=Jagged-Scar Archers's power and toughness are each equal to the number of Elves you control. -- {T}: Jagged-Scar Archers deals damage equal to its power to target creature with flying. mana={1}{G}{G} @@ -50252,8 +50241,8 @@ abilities=defender [/card] [card] name=Kagemaro, First to Suffer -auto=foreach(*|myhand) 1/1 -auto={B}{S}:foreach(*|myhand) -1/-1 all(creature) +auto=type:*:myhand/type:*:myhand cdaactive +auto={B}{S}:-type:*:myhand/-type:*:myhand all(creature) text=Kagemaro, First to Suffer's power and toughness are each equal to the number of cards in your hand. -- {B}, Sacrifice Kagemaro: All creatures get -X/-X until end of turn, where X is the number of cards in your hand. mana={3}{B}{B} type=Legendary Creature @@ -51342,7 +51331,7 @@ toughness=1 [/card] [card] name=Keldon Warlord -auto=foreach(creature[-wall]|myBattlefield) 1/1 +auto=type:creature[-wall]:myBattlefield/type:creature[-wall]:myBattlefield cdaactive text=Keldon Warlord's power and toughness are each equal to the number of non-Wall creatures you control. mana={2}{R}{R} type=Creature @@ -51991,7 +51980,7 @@ toughness=2 [card] name=Kithkin Rabble abilities=vigilance -auto=foreach(*[white]|myBattlefield) 1/1 +auto=type:*[white]:myBattlefield/type:*[white]:myBattlefield cdaactive text=Vigilance -- Kithkin Rabble's power and toughness are each equal to the number of white permanents you control. mana={3}{W} type=Creature @@ -52115,7 +52104,7 @@ toughness=1 [/card] [card] name=Kiyomaro, First to Stand -auto=foreach(*|myhand) 1/1 +auto=type:*:myhand/type:*:myhand cdaactive auto=aslongas(*|myhand) vigilance >3 auto=@damaged(player) from(this) restriction{type(*|myhand)~morethan~6}:life:7 controller >6 auto=@damaged(creature) from(this) restriction{type(*|myhand)~morethan~6}:life:7 controller >6 @@ -52609,7 +52598,7 @@ toughness=1 [card] name=Kolaghan Forerunners abilities=trample -auto=foreach(creature|mybattlefield) 1/0 +auto=type:creature:mybattlefield/3 cdaactive other={R}{2} name(Dash) auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever text=Trample -- Kolaghan Forerunners's power is equal to the number of creatures you control. -- Dash {2}{R} (You may cast this spell for its dash cost. If you do, it gains haste, and it's returned from the battlefield to its owner's hand at the beginning of the next end step.) @@ -52843,7 +52832,7 @@ toughness=1 [card] name=Korlash Heir to Blackblade auto={discard(korlash heir to blackblade|myhand)}:moveto(mybattlefield) and!(tap)! target(swamp|mylibrary) -auto=foreach(swamp|mybattlefield) 1/1 +auto=type:swamp:mybattlefield/type:swamp:mybattlefield cdaactive auto={1}{B}:regenerate text=Korlash, Heir to Blackblade's power and toughness are each equal to the number of Swamps you control. -- {1}{B}: Regenerate Korlash. -- Grandeur - Discard another card named Korlash, Heir to Blackblade: Search your library for up to two Swamp cards, put them onto the battlefield tapped, then shuffle your library. mana={2}{B}{B} @@ -53276,7 +53265,7 @@ subtype=Aura [card] name=Krovikan Mist abilities=flying -auto=foreach(illusion|battlefield) 1/1 +auto=type:illusion:battlefield/type:illusion:battlefield cdaactive text=Flying -- Krovikan Mist's power and toughness are each equal to the number of Illusions on the battlefield. mana={1}{U} type=Creature @@ -54868,7 +54857,7 @@ toughness=5 [/card] [card] name=Lhurgoyf -auto=foreach(creature|graveyard) 1/1 +auto=type:creature:graveyard/plusonetype:creature:graveyard cdaactive text=Lhurgoyf's power is equal to the number of creature cards in all graveyards and its toughness is equal to that number plus 1. mana={2}{G}{G} type=Creature @@ -56197,7 +56186,7 @@ toughness=2 [/card] [card] name=Lord of Extinction -auto=foreach(*|graveyard) 1/1 +auto=type:*:graveyard/type:*:graveyard cdaactive text=Lord of Extinction's power and toughness are each equal to the number of cards in all graveyards. mana={3}{B}{G} type=Creature @@ -57509,7 +57498,7 @@ toughness=6 [card] name=Magnivore abilities=haste -auto=foreach(sorcery|graveyard) 1/1 +auto=type:sorcery:graveyard/type:sorcery:graveyard cdaactive text=Haste (This creature can attack the turn it comes under your control.) -- Magnivore's power and toughness are each equal to the number of sorcery cards in all graveyards. mana={2}{R}{R} type=Creature @@ -58300,9 +58289,7 @@ toughness=3 [/card] [card] name=Maraxus of Keld -auto=foreach(artifact[-tapped]|myBattlefield) 1/1 -auto=foreach(creature[-tapped]|myBattlefield) 1/1 -auto=foreach(land[-tapped]|myBattlefield) 1/1 +auto=type:*[-tapped&-enchantment;-tapped&-planeswalker]/type:*[-tapped&-enchantment;-tapped&-planeswalker] cdaactive text=Maraxus of Keld's power and toughness are each equal to the number of untapped artifacts, creatures, and lands you control. mana={4}{R}{R} type=Legendary Creature @@ -58677,7 +58664,7 @@ toughness=4 [/card] [card] name=Maro -auto=foreach(*|myhand) 1/1 +auto=type:*:myhand/type:*:myhand cdaactive text=Maro's power and toughness are each equal to the number of cards in your hand. mana={2}{G}{G} type=Creature @@ -59210,7 +59197,7 @@ toughness=2 [card] name=Master of Etherium auto=lord(other creature[artifact]|mybattlefield) 1/1 -auto=foreach(artifact|mybattlefield) 1/1 +auto=type:artifact:mybattlefield/type:artifact:mybattlefield cdaactive text=Master of Etherium's power and toughness are each equal to the number of artifacts you control. -- Other artifact creatures you control get +1/+1. mana={2}{U} type=Artifact Creature @@ -59315,7 +59302,7 @@ toughness=4 [/card] [card] name=Masumaro, First to Live -auto=foreach(*|myhand) 2/2 +auto=twicetype:*:myhand/twicetype:*:myhand cdaactive text=Masumaro, First to Live's power and toughness are each equal to twice the number of cards in your hand. mana={3}{G}{G}{G} type=Legendary Creature @@ -59325,11 +59312,7 @@ toughness=* [/card] [card] name=Matca Rioters -auto=aslongas(forest|myBattlefield) 1/1 -auto=aslongas(island|myBattlefield) 1/1 -auto=aslongas(plains|myBattlefield) 1/1 -auto=aslongas(mountain|myBattlefield) 1/1 -auto=aslongas(swamp|myBattlefield) 1/1 +auto=pbasiclandtypes/pbasiclandtypes cdaactive text=Domain - Matca Rioters's power and toughness are each equal to the number of basic land types among lands you control. mana={2}{G} type=Creature @@ -62302,7 +62285,7 @@ toughness=8 [card] name=Molimo, Maro-Sorcerer abilities=trample -auto=foreach(land|myBattlefield) 1/1 +auto=type:land:myBattlefield/type:land:myBattlefield cdaactive text=Trample (If this creature would deal enough damage to its blockers to destroy them, you may have it deal the rest of its damage to defending player or planeswalker.) -- Molimo, Maro-Sorcerer's power and toughness are each equal to the number of lands you control. mana={4}{G}{G}{G} type=Legendary Creature @@ -63180,7 +63163,7 @@ toughness=2 [card] name=Mortivore auto={B}:regenerate -auto=foreach(creature|graveyard) 1/1 +auto=type:creature:graveyard/type:creature:graveyard cdaactive text=Mortivore's power and toughness are each equal to the number of creature cards in all graveyards. -- {B}: Regenerate Mortivore. (The next time this creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) mana={2}{B}{B} type=Creature @@ -63575,8 +63558,7 @@ toughness=2 [card] name=Multani, Maro-Sorcerer abilities=shroud -auto=foreach(*|myhand) 1/1 -auto=foreach(*|opponenthand) 1/1 +auto=type:*:hand/type:*:hand cdaactive text=Shroud (This permanent can't be the target of spells or abilities.) -- Multani's power and toughness are each equal to the total number of cards in all players' hands. mana={4}{G}{G} type=Legendary Creature @@ -64389,7 +64371,7 @@ subtype=Shapeshifter name=Nameless One facedown={3} autofacedown={2}{U}:morph -auto=foreach(wizard) 1/1 +auto=type:wizard:battlefield/type:wizard:battlefield cdaactive text=Nameless One's power and toughness are each equal to the number of Wizards on the battlefield. -- Morph {2}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={3}{U} type=Creature @@ -65793,7 +65775,7 @@ type=Sorcery [card] name=Nightmare abilities=flying -auto=foreach(swamp|myBattlefield) 1/1 +auto=type:swamp:mybattlefield/type:swamp:mybattlefield cdaactive text=Flying -- Nightmare's power and toughness are each equal to the number of Swamps you control. mana={5}{B} type=Creature @@ -65911,7 +65893,7 @@ toughness=4 [/card] [card] name=Nightstalker Engine -auto=foreach(creature|myGraveyard) 1/0 +auto=type:creature:myGraveyard/3 cdaactive text=Nightstalker Engine's power is equal to the number of creature cards in your graveyard. mana={4}{B} type=Creature @@ -68690,7 +68672,7 @@ toughness=2 [/card] [card] name=Overbeing of Myth -auto=foreach(*|myhand) 1/1 +auto=type:*:myhand/type:*:myhand cdaactive auto=@each my draw:draw:1 text=Overbeing of Myth's power and toughness are each equal to the number of cards in your hand. -- At the beginning of your draw step, draw an additional card. mana={GU}{GU}{GU}{GU}{GU} @@ -68943,7 +68925,7 @@ type=Sorcery [/card] [card] name=Pack Rat -auto=foreach(creature[rat]|mybattlefield) 1/1 +auto=type:rat:mybattlefield/type:rat:mybattlefield cdaactive auto={2}{B}{discard(*|myhand)}:token(253624) text=Pack Rat's power and toughness are each equal to the number of Rats you control. -- {2}{B}, Discard a card: Put a token onto the battlefield that's a copy of Pack Rat. mana={1}{B} @@ -69187,7 +69169,7 @@ toughness=4 [/card] [card] name=Pallimud -auto=foreach(land[tapped]|opponentBattlefield) 1/0 +auto=type:land[tapped]:opponentbattlefield/3 cdaactive text=As Pallimud enters the battlefield, choose an opponent. -- Pallimud's power is equal to the number of tapped lands the chosen player controls. mana={2}{R} type=Creature @@ -70317,7 +70299,7 @@ toughness=6 [/card] [card] name=Pestilence Rats -auto=foreach(other rat) 1/0 +auto=othertype:rat:battlefield/3 cdaactive text=Pestilence Rats's power is equal to the number of other Rats on the battlefield. (For example, as long as there are two other Rats on the battlefield, Pestilence Rats's power and toughness are 2/3.) mana={2}{B} type=Creature @@ -71781,7 +71763,7 @@ toughness=1 [/card] [card] name=Plague Rats -auto=foreach(plague rats) 1/1 +auto=myname/myname cdaactive text=Plague Rats's power and toughness are each equal to the number of creatures named Plague Rats on the battlefield. mana={2}{B} type=Creature @@ -72982,7 +72964,7 @@ subtype=Aura [card] name=Primalcrux abilities=trample -auto=thisforeach(variable{type:manag:mybattlefield}>0) 1/1 +auto=type:manag:mybattlefield/type:manag:mybattlefield cdaactive text=Trample -- Chroma - Primalcrux's power and toughness are each equal to the number of green mana symbols in the mana costs of permanents you control. mana={G}{G}{G}{G}{G}{G} type=Creature @@ -73655,7 +73637,7 @@ type=Enchantment [/card] [card] name=Psychosis Crawler -auto=foreach(*|myhand) 1/1 +auto=type:*:myhand/type:*:myhand cdaactive auto=@drawn(controller):life:-1 opponent text=Psychosis Crawler's power and toughness are each equal to the number of cards in your hand. - Whenever you draw a card, each opponent loses 1 life. mana={5} @@ -76649,7 +76631,7 @@ toughness=2 [card] name=Reckless One abilities=haste -auto=foreach(goblin) 1/1 +auto=type:goblin:battlefield/type:goblin:battlefield cdaactive text=Haste -- Reckless One's power and toughness are each equal to the number of Goblins on the battlefield. mana={3}{R} type=Creature @@ -77988,7 +77970,7 @@ type=Artifact [card] name=Revenant abilities=flying -auto=foreach(creature|mygraveyard) 1/1 +auto=type:creature:mygraveyard/type:creature:mygraveyard cdaactive text=Flying -- Revenant's power and toughness are each equal to the number of creature cards in your graveyard. mana={4}{B} type=Creature @@ -80001,7 +79983,7 @@ toughness=3 [/card] [card] name=Rubblehulk -auto=type:land:mybattlefield/type:land:mybattlefield nonstatic +auto=type:land:mybattlefield/type:land:mybattlefield cdaactive autohand={1}{R}{G}{discard}:name(bloodrush) target(creature[attacking]) type:land:mybattlefield/type:land:mybattlefield ueot text=Rubblehulk's power and toughness are each equal to the number of lands you control. -- Bloodrush — {1}{R}{G}, Discard Rubblehulk: Target attacking creature gets +X/+X until end of turn, where X is the number of lands you control. mana={4}{R}{G} @@ -80525,7 +80507,7 @@ type=Artifact [card] name=Rusting Golem auto=fading:5 -auto=thisforeach(counter{0/0.1.Fade}) 1/1 +auto=counter{0%0.1.Fade}/counter{0%0.1.Fade} cdaactive text=Fading 5 (This creature enters the battlefield with five fade counters on it. At the beginning of your upkeep, remove a fade counter from it. If you can't, sacrifice it.) -- Rusting Golem's power and toughness are each equal to the number of fade counters on it. mana={4} type=Artifact Creature @@ -82565,7 +82547,7 @@ toughness=1 [/card] [card] name=Scion of the Wild -auto=foreach(creature|myBattlefield) 1/1 +auto=type:creature:myBattlefield/type:creature:myBattlefield cdaactive text=Scion of the Wild's power and toughness are each equal to the number of creatures you control. mana={1}{G}{G} type=Creature @@ -84617,7 +84599,7 @@ toughness=3 name=Serpent of the Endless Sea abilities=cantattack auto=aslongas(island|opponentBattlefield) -cantattack -auto=foreach(island|myBattlefield) 1/1 +auto=type:island:myBattlefield/type:island:myBattlefield cdaactive text=Serpent of the Endless Sea's power and toughness are each equal to the number of Islands you control. -- Serpent of the Endless Sea can't attack unless defending player controls an Island. mana={4}{U} type=Creature @@ -84690,7 +84672,7 @@ toughness=1 [/card] [card] name=Serra Avatar -auto=thisforeach(controllerlife) 1/1 +auto=controllerlife/controllerlife cdaactive 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} @@ -85006,8 +84988,8 @@ toughness=2 [/card] [card] name=Sewer Nemesis -auto=choice name(opponent) transforms((,newability[foreach(*|opponentgraveyard) 1/1],newability[@movedTo(*|opponentstack):deplete:1 opponent])) forever -auto=choice name(you) transforms((,newability[foreach(*|mygraveyard) 1/1],newability[@movedTo(*|mystack):deplete:1 controller])) forever +auto=choice name(opponent) transforms((,newability[type:*:opponentgraveyard/type:*:opponentgraveyard cdaactive],newability[@movedTo(*|opponentstack):deplete:1 opponent])) forever +auto=choice name(you) transforms((,newability[type:*:mygraveyard/type:*:mygraveyard cdaactive],newability[@movedTo(*|mystack):deplete:1 controller])) forever text=As Sewer Nemesis enters the battlefield, choose a player. -- Sewer Nemesis's power and toughness are each equal to the number of cards in the chosen player's graveyard. -- Whenever the chosen player casts a spell, that player puts the top card of his or her library into his or her graveyard. mana={3}{B} type=Creature @@ -87386,7 +87368,7 @@ toughness=5 [/card] [card] name=Sima Yi, Wei Field Marshal -auto=foreach(swamp|myBattlefield) 1/0 +auto=type:swamp:myBattlefield/4 cdaactive text=Sima Yi, Wei Field Marshal's power is equal to the number of Swamps you control. mana={5}{B} type=Legendary Creature @@ -88839,7 +88821,7 @@ toughness=3 [card] name=Skyshroud War Beast abilities=trample -auto=foreach(land[-basic]|opponentBattlefield) 1/1 +auto=type:land[-basic]:opponentBattlefield/type:land[-basic]:opponentBattlefield cdaactive text=Trample -- As Skyshroud War Beast enters the battlefield, choose an opponent. -- Skyshroud War Beast's power and toughness are each equal to the number of nonbasic lands the chosen player controls. mana={1}{G} type=Creature @@ -88913,7 +88895,7 @@ toughness=3 [/card] [card] name=Slag Fiend -auto=foreach(artifact|graveyard) 1/1 +auto=type:artifact:graveyard/type:artifact:graveyard cdaactive text=Slag Fiend's power and toughness are each equal to the number of artifact cards in all graveyards. mana={R} type=Creature @@ -90410,7 +90392,7 @@ toughness=1 [card] name=Soramaro, First to Dream abilities=flying -auto=foreach(*|myhand) 1/1 +auto=type:*:myhand/type:*:myhand cdaactive auto={4}{H(land|myBattlefield)}:draw:1 text=Flying -- Soramaro, First to Dream's power and toughness are each equal to the number of cards in your hand. -- {4}, Return a land you control to its owner's hand: Draw a card. mana={4}{U}{U} @@ -90926,8 +90908,7 @@ toughness=2 [/card] [card] name=Soulless One -auto=foreach(zombie|graveyard) 1/1 -auto=foreach(zombie) 1/1 +auto=pgbzombie/pgbzombie cdaactive text=Soulless One's power and toughness are each equal to the number of Zombies on the battlefield plus the number of Zombie cards in all graveyards. mana={3}{B} type=Creature @@ -90984,7 +90965,7 @@ type=Instant [card] name=Soulsurge Elemental abilities=first strike -auto=foreach(creature|myBattlefield) 1/0 +auto=type:creature:myBattlefield/1 cdaactive text=First strike -- Soulsurge Elemental's power is equal to the number of creatures you control. mana={3}{R} type=Creature @@ -91514,8 +91495,7 @@ toughness=1 [card] name=Spellheart Chimera abilities=flying,trample -auto=type:*[instant]:mygraveyard/0 nonstatic -auto=type:*[sorcery]:mygraveyard/0 nonstatic +auto=pginstantsorcery/3 cdaactive text=Flying. -- Trample. -- Spellheart Chimera's power is equal to the number of instant and sorcery cards in your graveyard. mana={1}{U}{R} type=Creature @@ -92502,7 +92482,7 @@ color=green [card] name=Splinterfright abilities=trample -auto=foreach(creature|mygraveyard) 1/1 +auto=type:creature:mygraveyard/type:creature:mygraveyard cdaactive auto=@each my upkeep:deplete:2 controller text=Trample -- Splinterfright's power and toughness are each equal to the number of creature cards in your graveyard -- At the beginning of your upkeep, put the top two cards of your library into your graveyard. mana={2}{G} @@ -92905,7 +92885,7 @@ type=Enchantment [/card] [card] name=Squelching Leeches -auto=foreach(swamp|myBattlefield) 1/1 +auto=type:swamp:myBattlefield/type:swamp:myBattlefield cdaactive text=Squelching Leeches's power and toughness are each equal to the number of Swamps you control. mana={2}{B}{B} type=Creature @@ -95064,7 +95044,7 @@ toughness=6 [card] name=Sturmgeist abilities=flying -auto=foreach(*|myhand) 1/1 +auto=type:*:myhand/type:*:myhand cdaactive auto=@combatdamaged(player) from(this):draw:1 controller text=Flying -- Sturmgeist's power and toughness are each equal to the number of cards in your hand. -- Whenever Sturmgeist deals combat damage to a player, draw a card. mana={3}{U}{U} @@ -96180,7 +96160,7 @@ toughness=0 [/card] [card] name=Swarm of Rats -auto=foreach(rat|myBattlefield) 1/0 +auto=type:rat:mybattlefield/1 cdaactive text=Swarm of Rats's power is equal to the number of Rats you control. mana={1}{B} type=Creature @@ -96647,7 +96627,7 @@ type=Sorcery [/card] [card] name=Sylvan Yeti -auto=foreach(*|myhand) 1/0 +auto=type:*:myhand/4 cdaactive text=Sylvan Yeti's power is equal to the number of cards in your hand. mana={2}{G}{G} type=Creature @@ -97496,14 +97476,7 @@ toughness=7 [/card] [card] name=Tarmogoyf -auto=aslongas(artifact|graveyard) 1/1 -auto=aslongas(creature|graveyard) 1/1 -auto=aslongas(enchantment|graveyard) 1/1 -auto=aslongas(instant|graveyard) 1/1 -auto=aslongas(land|graveyard) 1/1 -auto=aslongas(sorcery|graveyard) 1/1 -auto=aslongas(tribal|graveyard) 1/1 -auto=aslongas(planeswalker|graveyard) 1/1 +auto=gravecardtypes/plusonegravecardtypes cdaactive text=Tarmogoyf's power is equal to the number of card types among cards in all graveyards and its toughness is equal to that number plus 1. (The card types are artifact, creature, enchantment, instant, land, planeswalker, sorcery, and tribal.) mana={1}{G} type=Creature @@ -98535,7 +98508,7 @@ type=Artifact [card] name=Terravore abilities=trample -auto=foreach(land|graveyard) 1/1 +auto=type:land:graveyard/type:land:graveyard cdaactive text=Trample -- Terravore's power and toughness are each equal to the number of land cards in all graveyards. mana={1}{G}{G} type=Creature @@ -100385,8 +100358,8 @@ toughness=5 [/card] [card] name=Tidewalker -auto=foreach(island|myBattlefield) counter(0/0,1,Time) -auto=thisforeach(counter{0/0.1.Time}) 1/1 +auto=foreach(island|myBattlefield) counter(0/0,1,Time) oneshot +auto=counter{0%0.1.Time}/counter{0%0.1.Time} cdaactive auto=vanishing:0 text=Tidewalker enters the battlefield with a time counter on it for each Island you control. -- Vanishing (At the beginning of your upkeep, remove a time counter from this permanent. When the last is removed, sacrifice it.) -- Tidewalker's power and toughness are each equal to the number of time counters on it. mana={2}{U} @@ -103532,7 +103505,7 @@ toughness=2 [/card] [card] name=Uktabi Wildcats -auto=foreach(forest|myBattlefield) 1/1 +auto=type:forest:mybattlefield/type:forest:mybattlefield cdaactive auto={G}{S(forest|myBattlefield)}:regenerate text=Uktabi Wildcats's power and toughness are each equal to the number of Forests you control. -- {G}, Sacrifice a Forest: Regenerate Uktabi Wildcats. mana={4}{G} @@ -103577,16 +103550,16 @@ toughness=8 [/card] [card] name=Ulasht, the Hate Seed -auto=foreach(other creature[red]|myBattlefield) counter(1/1,1) -auto=foreach(other creature[green]|myBattlefield) counter(1/1,1) +auto=foreach(other creature[red]|myBattlefield) counter(1/1,1) oneshot +auto=foreach(other creature[green]|myBattlefield) counter(1/1,1) oneshot auto={1}{C(1/1,-1)}:damage:1 target(creature) auto={1}{C(1/1,-1)}:token(Saproling,Creature Saproling,1/1,green) text=Ulasht, the Hate Seed enters the battlefield with a +1/+1 counter on it for each other red creature you control and a +1/+1 counter on it for each other green creature you control. -- {1}, Remove a +1/+1 counter from Ulasht: Choose one - Ulasht deals 1 damage to target creature; or put a 1/1 green Saproling creature token onto the battlefield. mana={2}{R}{G} type=Legendary Creature subtype=Hellion Hydra -power=* -toughness=* +power=0 +toughness=0 [/card] [card] name=Ultimate Price @@ -103661,7 +103634,7 @@ type=Artifact [/card] [card] name=Umbra Stalker -auto=thisforeach(variable{type:manab:mygraveyard}>0) 1/1 +auto=type:manab:mygraveyard/type:manab:mygraveyard cdaactive text=Chroma - Umbra Stalker's power and toughness are each equal to the number of black mana symbols in the mana costs of cards in your graveyard. mana={4}{B}{B}{B} type=Creature @@ -107478,7 +107451,7 @@ toughness=2 name=Elemental type=Creature subtype=Elemental -auto=foreach(creature|mybattlefield) 1/1 +auto=type:creature:mybattlefield/type:creature:mybattlefield cdaactive text=This creature's power and toughness are each equal to the number of creature cards in its controller's battlefield. power=* toughness=* @@ -109682,7 +109655,7 @@ toughness=3 [/card] [card] name=Wayfaring Temple -auto=foreach(creature|mybattlefield) 1/1 +auto=type:creature:mybattlefield/type:creature:mybattlefield cdaactive auto=@combatdamaged(player) from(this) restriction{type(creature[token]|mybattlefield)~morethan~0}:name(populate) clone notatarget(creature[token]|mybattlefield) text=Wayfaring Temple's power and toughness are each equal to the number of creatures you control. -- Whenever Wayfaring Temple deals combat damage to a player, populate. (Put a token onto the battlefield that's a copy of a creature token you control.) mana={1}{G}{W} @@ -110732,7 +110705,7 @@ toughness=4 [card] name=Wilderness Elemental abilities=trample -auto=foreach(land[-basic]|opponentBattlefield) 1/0 +auto=type:land[-basic]:opponentbattlefield/3 cdaactive text=Trample -- Wilderness Elemental's power is equal to the number of nonbasic lands your opponents control. mana={1}{R}{G} type=Creature @@ -112791,8 +112764,7 @@ type=Legendary Land [/card] [card] name=Yavimaya Kavu -auto=foreach(creature[red]|battlefield) 1/0 -auto=foreach(creature[green]|battlefield) 0/1 +auto=type:creature[red]:battlefield/type:creature[green]:battlefield cdaactive text=Yavimaya Kavu's power is equal to the number of red creatures on the battlefield. -- Yavimaya Kavu's toughness is equal to the number of green creatures on the battlefield. mana={2}{R}{G} type=Creature diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index eec795a76..8e70d92c8 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -402,7 +402,7 @@ private: } TargetChooserFactory tf(card->getObserver()); TargetChooser * tc = tf.createTargetChooser(theType.c_str(),NULL); - tc->other = other; + tc->other = other; for (int i = 0; i < 2; i++) { Player * p = card->getObserver()->players[i]; @@ -650,6 +650,61 @@ private: { intValue = target->controller()->opponent()->game->hand->nb_cards; } + else if (s == "pancientooze")//Ancient Ooze + { + intValue = 0; + for (int j = card->controller()->game->inPlay->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_CREATURE) && card->controller()->game->inPlay->cards[j] != card) + { + intValue += card->controller()->game->inPlay->cards[j]->getManaCost()->getConvertedCost(); + } + } + } + else if (s == "pdauntless")//Dauntless Dourbark + { + intValue = 0; + for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->battlefield->cards[j]->hasType("forest")) + { + intValue += 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("treefolk")) + { + intValue += 1; + } + } + } + else if (s == "pbasiclandtypes")//Basic Land types + { + intValue = 0; + int forest, plains, swamp, island, mountain = 0; + for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->battlefield->cards[j]->hasType("forest")) + { + forest = 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("plains")) + { + plains = 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("swamp")) + { + swamp = 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("island")) + { + island = 1; + } + if (card->controller()->game->battlefield->cards[j]->hasType("mountain")) + { + mountain = 1; + } + } + intValue = mountain + island + forest + swamp + plains; + } else if (s == "myname")//Plague Rats and others { intValue = 0;