diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 199021c66..2061ed379 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -512,7 +512,8 @@ toughness=1 [/card] [card] name=Academy Rector -auto=@movedTo(this|graveyard) from(battlefield):may all(trigger[to]) moveto(exile) && target(enchantment|mylibrary) moveTo(mybattlefield) +aicode=activate moveTo(myBattlefield) target(enchantment|myLibrary) +auto=@movedTo(this|graveyard) from(battlefield):may all(trigger[to]) moveto(exile) and!( name(search card) reveal:plibrarycount optionone name(choose card) target(enchantment|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend )! text=When Academy Rector dies, you may exile it. If you do, search your library for an enchantment card, put that card onto the battlefield, then shuffle your library. mana={3}{W} type=Creature @@ -719,8 +720,9 @@ type=Sorcery [/card] [card] name=Acquire -target=artifact|opponentLibrary -auto=moveTo(myBattlefield) +target=opponent +aicode=activate moveTo(myBattlefield) target(artifact|targetedpersonslibrary) +auto=name(search card) reveal:type:*:targetedpersonslibrary revealzone(targetedpersonslibrary) optionone name(choose card) target(artifact|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|targetedpersonslibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text=Search target opponent's library for an artifact card and put that card onto the battlefield under your control. Then that player shuffles his or her library. mana={3}{U}{U} type=Sorcery @@ -1844,8 +1846,9 @@ toughness=1 [/card] [card] name=Ainok Guide +aicode=activate target(land[basic]|mylibrary) moveto(mylibrary) and!(moveto(mylibrary))! auto=choice name(+1/+1 counter) counter(1/1,1) -auto=choice name(search basic land) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(land[basic]|mylibrary) optionone name(choose card) target(land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend +auto=choice name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) revealtype(land[basic]|mylibrary) optionone name(choose card) target(land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend revealend text=When Ainok Guide enters the battlefield, choose one: -- Put a +1/+1 counter on Ainok Guide. -- Search your library for a basic land card, reveal it, then shuffle your library and put that card on top of it. mana={1}{G} type=Creature @@ -2977,7 +2980,8 @@ toughness=* [/card] [card] name=Altar of Bone -auto=moveTo(myhand) target(Creature|myLibrary) +aicode=activate target(creature|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>creature|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=As an additional cost to cast Altar of Bone, sacrifice a creature. -- Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library. mana={G}{W}{S(creature|mybattlefield)} type=Sorcery @@ -3241,7 +3245,8 @@ toughness=1 [/card] [card] name=Amrou Scout -auto={4}{T}:moveTo(myBattlefield) target(rebel[manacost<=3]|mylibrary) +aicode=activate moveTo(myBattlefield) target(rebel[manacost<=3]|myLibrary) +auto={4}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(rebel[manacost<=3]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text={4}, {T}: Search your library for a Rebel permanent card with converted mana cost 3 or less and put it onto the battlefield. Then shuffle your library. mana={1}{W} type=Creature @@ -4069,7 +4074,8 @@ type=Artifact [/card] [card] name=Angel's Herald -auto={2}{W}{T}{S(creature[green]|myBattlefield)}{S(creature[white]|myBattlefield)}{S(creature[blue]|myBattlefield)}:moveTo(mybattlefield) target(empyrial archangel|mylibrary) +aicode=activate moveTo(myBattlefield) target(empyrial archangel|myLibrary) +auto={2}{W}{T}{S(creature[green]|myBattlefield)}{S(creature[white]|myBattlefield)}{S(creature[blue]|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(empyrial archangel|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text={2}{W}, {T}, Sacrifice a green creature, a white creature, and a blue creature: Search your library for a card named Empyrial Archangel and put it onto the battlefield. Then shuffle your library. mana={W} type=Creature @@ -5523,7 +5529,7 @@ toughness=5 [/card] [card] name=Arcum Dagsson -auto={T}:target(creature[artifact]|opponentbattlefield) sacrifice && ability$!name(fetch non-creature artifact) target(artifact[-creature]|mylibrary) moveTo(mybattlefield)!$ opponent +auto={T}:target(creature[artifact]) sacrifice && ability$!name(search card) notatarget(artifact[-creature]|mylibrary) moveTo(mybattlefield)!$ targetcontroller text={T}: Target artifact creature's controller sacrifices it. That player may search his or her library for a noncreature artifact card, put it onto the battlefield, then shuffle his or her library. mana={3}{U} type=Legendary Creature @@ -5724,7 +5730,8 @@ toughness=5 [/card] [card] name=Arid Mesa -auto={L}{T}{S}:moveTo(myBattlefield) target(mountain,plains|mylibrary) +aicode=activate moveTo(myBattlefield) target(*[mountain;plains]|myLibrary) +auto={L}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[mountain;plains]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveto(ownerbattlefield))! afterrevealedend revealend text={T}, Pay 1 life, Sacrifice Arid Mesa: Search your library for a Mountain or Plains card and put it onto the battlefield. Then shuffle your library. type=Land [/card] @@ -5860,7 +5867,8 @@ type=Instant [/card] [card] name=Armillary Sphere -auto={2}{T}{S}:target(land[basic]|mylibrary) moveTo(myhand) +aicode=activate target(land[basic]|mylibrary) moveto(myhand) +auto={2}{T}{S}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text={2}, {T}, Sacrifice Armillary Sphere: Search your library for up to two basic land cards, reveal them, and put them into your hand. Then shuffle your library. mana={2} type=Artifact @@ -6220,7 +6228,8 @@ subtype=Aura [/card] [card] name=Artificer's Intuition -auto={U}{D(artifact|myhand)}:moveTo(myhand) target(artifact[manacost<=1]|mylibrary) +aicode=activate target(artifact[manacost<=1]|mylibrary) moveto(myhand) +auto={U}{D(artifact|myhand)}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>artifact[manacost<=1]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text={U}, Discard an artifact card: Search your library for an artifact card with converted mana cost 1 or less, reveal that card, and put it into your hand. Then shuffle your library. mana={1}{U} type=Enchantment @@ -6870,7 +6879,8 @@ type=Enchantment [/card] [card] name=Attune with Aether -auto=moveTo(myhand) notatarget(land[basic]|mylibrary) +aicode=activate target(land[basic]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend auto=alterenergy:2 controller text=Search your library for a basic land card, reveal it, put it into your hand, then shuffle your library. You get {E}{E} (two energy counters). mana={G} @@ -7250,7 +7260,8 @@ toughness=3 [card] name=Aurochs Herd abilities=trample -auto=may moveto(myHand) target(aurochs|myLibrary) +aicode=activate target(*[aurochs]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[aurochs]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend auto=@combat(attacking) source(this):all(this) foreach(other aurochs[attacking]) 1/0 ueot text=Trample -- When Aurochs Herd enters the battlefield, you may search your library for an Aurochs card, reveal it, and put it into your hand. If you do, shuffle your library. -- Whenever Aurochs Herd attacks, it gets +1/+0 until end of turn for each other attacking Aurochs. mana={5}{G} @@ -7449,7 +7460,8 @@ type=Sorcery [card] name=Avarax abilities=haste -auto=may moveTo(myhand) target(Avarax|mylibrary) +aicode=activate target(Avarax|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>Avarax|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend auto={1}{R}:1/0 text=Haste -- When Avarax enters the battlefield, you may search your library for a card named Avarax, reveal it, and put it into your hand. If you do, shuffle your library. -- {1}{R}: Avarax gets +1/+0 until end of turn. mana={3}{R}{R} @@ -8340,7 +8352,8 @@ type=Enchantment [card] name=Bad River auto=tap(noevent) -auto={T}{S}:moveTo(myBattlefield) target(island,swamp|myLibrary) +aicode=activate moveTo(myBattlefield) target(*[island;swamp]|myLibrary) +auto={T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[island;swamp]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveto(ownerbattlefield))! afterrevealedend revealend text=Bad River enters the battlefield tapped. -- {T}, Sacrifice Bad River: Search your library for an Island or Swamp card and put it onto the battlefield. Then shuffle your library. type=Land [/card] @@ -10271,7 +10284,8 @@ subtype=Equipment [/card] [card] name=Behemoth's Herald -auto={2}{G}{T}{S(creature[red]|myBattlefield)}{S(creature[green]|myBattlefield)}{S(creature[white]|myBattlefield)}:moveTo(mybattlefield) target(godsire|mylibrary) +aicode=activate moveTo(myBattlefield) target(godsire|myLibrary) +auto={2}{G}{T}{S(creature[red]|myBattlefield)}{S(creature[green]|myBattlefield)}{S(creature[white]|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(godsire|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text={2}{G}, {T}, Sacrifice a red creature, a green creature, and a white creature: Search your library for a card named Godsire and put it onto the battlefield. Then shuffle your library. mana={G} type=Creature @@ -10686,7 +10700,8 @@ type=Instant [/card] [card] name=Beseech the Queen -auto=moveTo(myhand) notatarget(*[manacost<=type:land:mybattlefield]|mylibrary) +aicode=activate target(*[manacost<=type:land:mybattlefield]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost<=type:land:mybattlefield]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=({(2/b)} can be paid with any two mana or with {B}. This card's converted mana cost is 6.) -- Search your library for a card with converted mana cost less than or equal to the number of lands you control, reveal it, and put it into your hand. Then shuffle your library. mana={2B}{2B}{2B} type=Sorcery @@ -10749,7 +10764,8 @@ type=Legendary Enchantment Artifact [card] name=Bifurcate target=creature[-token] -auto=moveTo(mybattlefield) notatarget(*[share!name!]|mylibrary) +aicode=activate moveTo(myBattlefield) target(*[share!name!]|myLibrary) +auto=name(search card) reveal:plibrarycount optionone name(choose card) target(*[share!name!]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text=Search your library for a permanent card with the same name as target nontoken creature and put that card onto the battlefield. Then shuffle your library. mana={3}{G} type=Sorcery @@ -10901,22 +10917,8 @@ toughness=4 [/card] [card] name=Birthing Pod -auto={1}{p(G)}{T}{S(creature[manacost=0]|mybattlefield)}:name(search for creature with manacost = 1) target(creature[manacost=1]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=1]|mybattlefield)}:name(with manacost = 2) target(creature[manacost=2]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=2]|mybattlefield)}:name(with manacost = 3) target(creature[manacost=3]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=3]|mybattlefield)}:name(with manacost = 4) target(creature[manacost=4]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=4]|mybattlefield)}:name(with manacost = 5) target(creature[manacost=5]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=5]|mybattlefield)}:name(with manacost = 6) target(creature[manacost=6]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=6]|mybattlefield)}:name(with manacost = 7) target(creature[manacost=7]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=7]|mybattlefield)}:name(with manacost = 8) target(creature[manacost=8]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=8]|mybattlefield)}:name(with manacost = 9) target(creature[manacost=9]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=9]|mybattlefield)}:name(with manacost = 10) target(creature[manacost=10]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=10]|mybattlefield)}:name(with manacost = 11) target(creature[manacost=11]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=11]|mybattlefield)}:name(with manacost = 12) target(creature[manacost=12]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=12]|mybattlefield)}:name(with manacost = 13) target(creature[manacost=13]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=13]|mybattlefield)}:name(with manacost = 14) target(creature[manacost=14]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=14]|mybattlefield)}:name(with manacost = 15) target(creature[manacost=15]|mylibrary) moveTo(myBattlefield) asSorcery -auto={1}{p(G)}{T}{S(creature[manacost=15]|mybattlefield)}:name(with manacost = 16) target(creature[manacost=16]|mylibrary) moveTo(myBattlefield) asSorcery +aicode=activate moveTo(myBattlefield) target(creature[manacost=storedmanacostplus1plusend]|mylibrary) +auto={1}{p(G)}{T}{S(creature|mybattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(creature[manacost=storedmanacostplus1plusend]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend asSorcery text=({(g/p)} can be paid with either {G} or 2 life.) {1}{(g/p)}, {T}, Sacrifice a creature: Search your library for a creature card with converted mana cost equal to 1 plus the sacrificed creature's converted mana cost, put that card onto the battlefield, then shuffle your library. Activate this ability only any time you could cast a sorcery. color=green mana={3}{p(G)} @@ -10961,7 +10963,8 @@ subtype=Faerie [card] name=Bitterheart Witch abilities=deathtouch -auto=@movedTo(this|ownergraveyard) from(battlefield):may moveTo(opponentbattlefield) target(curse|mylibrary) +aicode=activate moveTo(myBattlefield) target(curse|myLibrary) +auto=@movedTo(this|graveyard) from(battlefield):name(search card) reveal:plibrarycount optionone name(choose card) target(curse|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text=Deathtouch -- When Bitterheart Witch dies, you may search your library for a Curse card, put it onto the battlefield attached to target player, then shuffle your library. mana={4}{B} type=Creature @@ -11624,7 +11627,8 @@ type=Land [card] name=Blighted Woodland auto={T}:add{1} -auto={3}{G}{T}{S}:moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto={3}{G}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend text={T}: Add {1} to your mana pool. -- {3}{G}, {T}, Sacrifice Blighted Woodland: Search your library for up to two basic land cards and put them onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -11659,7 +11663,8 @@ toughness=2 [card] name=Blightspeaker auto={T}:life:-1 target(player) -auto={4}{T}:moveTo(myBattlefield) target(rebel[manacost<=3]|mylibrary) +aicode=activate moveTo(myBattlefield) target(rebel[manacost<=3]|myLibrary) +auto={4}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(rebel[manacost<=3]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text={T}: Target player loses 1 life. -- {4}, {T}: Search your library for a Rebel permanent card with converted mana cost 3 or less and put it onto the battlefield. Then shuffle your library. mana={1}{B} type=Creature @@ -12233,7 +12238,8 @@ toughness=1 [/card] [card] name=Blood Speaker -auto={S}:moveTo(myhand) target(demon|mylibrary) limit:1 myUpkeepOnly +aicode=activate target(demon|mylibrary) moveto(myhand) +auto={S}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>demon|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend limit:1 myUpkeepOnly autograveyard=@movedTo(demon|mybattlefield):moveTo(myhand) text=At the beginning of your upkeep, you may sacrifice Blood Speaker. If you do, search your library for a Demon card, reveal that card, and put it into your hand. Then shuffle your library. -- Whenever a Demon enters the battlefield under your control, return Blood Speaker from your graveyard to your hand. mana={3}{B} @@ -12754,7 +12760,8 @@ toughness=2 [/card] [card] name=Bloodstained Mire -auto={L}{T}{S}:moveTo(myBattlefield) target(swamp,mountain|mylibrary) +aicode=activate moveTo(myBattlefield) target(*[swamp;mountain]|myLibrary) +auto={L}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[swamp;mountain]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveto(ownerbattlefield))! afterrevealedend revealend text={T}, Pay 1 life, Sacrifice Bloodstained Mire: Search your library for a Swamp or Mountain card and put it onto the battlefield. Then shuffle your library. type=Land [/card] @@ -13045,7 +13052,8 @@ toughness=4 [card] name=Bog Glider abilities=flying -auto={T}{S(land|myBattlefield)}:moveTo(myBattlefield) target(mercenary[manacost<=2]|mylibrary) +aicode=activate moveTo(myBattlefield) target(mercenary[manacost<=2]|myLibrary) +auto={T}{S(land|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(mercenary[manacost<=2]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text=Flying -- {T}, Sacrifice a land: Search your library for a Mercenary permanent card with converted mana cost 2 or less and put that card onto the battlefield. Then shuffle your library. mana={2}{B} type=Creature @@ -13211,7 +13219,8 @@ toughness=4 [/card] [card] name=Bogbrew Witch -auto={2}{T}:moveTo(myBattlefield) and!(tap(noevent))! target(Festering Newt,Bubbling Cauldron|mylibrary) +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(Festering Newt,Bubbling Cauldron|myLibrary) +auto={2}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(Festering Newt,Bubbling Cauldron|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend text={2}{T}: Search your library for a card named Festering Newt or Bubbling Cauldron, put it onto the battlefield tapped, then shuffle your library. mana={3}{B} type=Creature @@ -13262,7 +13271,7 @@ toughness=1 [card] name=Boggart Harbinger aicode=activate target(goblin|mylibrary) moveto(mylibrary) and!(moveto(mylibrary))! -auto=Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(goblin|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend optiontwo bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(goblin|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend optiontwo bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend text=When Boggart Harbinger enters the battlefield, you may search your library for a Goblin card, reveal it, then shuffle your library and put that card on top of it. mana={2}{B} type=Creature @@ -13825,7 +13834,8 @@ toughness=3 [/card] [card] name=Borderland Ranger -auto=may moveTo(myHand) target(basic|myLibrary) +aicode=activate target(land[basic]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=When Borderland 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={2}{G} type=Creature @@ -14160,7 +14170,8 @@ toughness=3 [/card] [card] name=Boundless Realms -auto=moveTo(mybattlefield) and!(tap(noevent))! notatarget(land|mylibrary) +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto=name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend text=Search your library for up to X basic land cards, where X is the number of lands you control, and put them onto the battlefield tapped. Then shuffle your library. mana={6}{G} type=Sorcery @@ -14292,7 +14303,8 @@ type=Artifact [/card] [card] name=Braidwood Sextant -auto={2}{T}{S}:moveTo(myHand) target(land[basic]|myLibrary) +aicode=activate target(land[basic]|mylibrary) moveto(myhand) +auto={2}{T}{S}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text={2}, {T}, Sacrifice Braidwood Sextant: Search your library for a basic land card, reveal that card, and put it into your hand. Then shuffle your library. mana={1} type=Artifact @@ -14364,7 +14376,8 @@ name=Brainspoil target=creature[-enchanted] auto=cantregen auto=destroy -autohand={1}{B}{B}{discard}:moveto(myhand) target(*[manacost=5]|mylibrary) asSorcery +aicode=activate target(*[manacost=5]|mylibrary) moveto(myhand) +autohand={1}{B}{B}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=5]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend asSorcery text=Destroy target creature that isn't enchanted. It can't be regenerated. -- Transmute {1}{B}{B} ({1}{B}{B}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) mana={3}{B}{B} type=Sorcery @@ -14888,8 +14901,9 @@ type=Artifact [/card] [card] name=Bribery -target=creature|opponentLibrary -auto=moveTo(myBattlefield) +target=opponent +aicode=activate moveTo(myBattlefield) target(creature|targetedpersonslibrary) +auto=name(search card) reveal:type:*:targetedpersonslibrary revealzone(targetedpersonslibrary) optionone name(choose card) target(creature|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|targetedpersonslibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text=Search target opponent's library for a creature card and put that card onto the battlefield under your control. Then that player shuffles his or her library. mana={3}{U}{U} type=Sorcery @@ -15044,7 +15058,8 @@ type=Instant [/card] [card] name=Bring to Light -auto=notatarget(*[creature;instant;sorcery;manacost<=converge]|mylibrary) moveto(exile) and!( transforms((,newability[may name(cast for free) activate name(cast for free) castcard(normal)])) oneshot)! +aicode=activate notatarget(*[creature;instant;sorcery;manacost<=converge]|mylibrary) moveto(exile) and!( transforms((,newability[may name(cast for free) activate name(cast for free) castcard(normal)])) oneshot)! +auto=name(search card) reveal:plibrarycount optionone name(choose card) target(<1>*[creature;instant;sorcery;manacost<=converge]|reveal) moveto(exile) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|myexile) moveto(exile) and!( transforms((,newability[may name(cast for free) activate name(cast for free) castcard(normal)])) oneshot)! afterrevealedend revealend text=Converge -- Search your library for a creature, instant, or sorcery card with converted mana cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, then shuffle your library. You may cast that card without paying its mana cost. mana={3}{G}{U} type=Sorcery @@ -15052,8 +15067,9 @@ type=Sorcery [card] name=Bringer of the Black Dawn other={W}{U}{B}{R}{G} name(Spend WUBRG to Cast) -abilities=trample -auto=@each my upkeep restriction{compare(lifetotal)~morethan~1}:may name(pay 2 life) life:-2 controller && name(search a card) moveTo(exile) and!(transforms((,newability[moveto(ownerlibrary)])) oneshot)! notatarget(*|mylibrary) +abilities=trample,hiddenface +aicode=activate target(*|mylibrary) moveto(mylibrary) and!(moveto(mylibrary))! +auto=@each my upkeep:pay({L:2}) name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend revealend text=You may pay {W}{U}{B}{R}{G} rather than pay Bringer of the Black Dawn's mana cost. -- Trample -- At the beginning of your upkeep, you may pay 2 life. If you do, search your library for a card, then shuffle your library and put that card on top of it. mana={7}{B}{B} type=Creature @@ -15459,7 +15475,8 @@ toughness=2 [/card] [card] name=Brutalizer Exarch -auto=choice name(put on top) moveTo(exile) and!(transforms((,newability[moveto(ownerlibrary)])) oneshot)! notatarget(creature|mylibrary) +aicode=activate target(creature|mylibrary) moveto(mylibrary) and!(moveto(mylibrary))! +auto=choice name(put on top) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>creature|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mylibrary)])) optiononeend optiontwo bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend auto=choice name(put on bottom) bottomoflibrary target(*[-creature]) text=When Brutalizer Exarch enters the battlefield, choose one -- Search your library for a creature card, reveal it, then shuffle your library and put that card on top of it; or put target noncreature permanent on the bottom of its owner's library. mana={5}{G} @@ -15681,7 +15698,8 @@ type=Enchantment [/card] [card] name=Buried Alive -auto=moveto(mygraveyard) notatarget(creature|mylibrary) +aicode=activate target(creature|mylibrary) moveto(mygraveyard) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(creature|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mygraveyard)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library. mana={2}{B} type=Sorcery @@ -15838,7 +15856,8 @@ toughness=2 [/card] [card] name=Burnished Hart -auto={3}{S}:notatarget(land[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto={3}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend text={3},Sacrifice Burnished Hart: Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. mana={3} type=Artifact Creature @@ -16404,7 +16423,8 @@ type=Enchantment [/card] [card] name=Call the Gatewatch -auto=moveto(myhand) notatarget(*[planeswalker]|mylibrary) +aicode=activate target(*[planeswalker]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[planeswalker]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=Search your library for a planeswalker card, reveal it, and put it into your hand. Then shuffle your library. mana={2}{W} type=Sorcery @@ -16839,7 +16859,8 @@ toughness=3 [/card] [card] name=Captain Sisay -auto={T}:moveTo(myHand) target(*[legendary]|myLibrary) +aicode=activate target(*[legendary]|mylibrary) moveto(myhand) +auto={T}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[legendary]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text={T}: Search your library for a legendary card, reveal that card, and put it into your hand. Then shuffle your library. mana={2}{G}{W} type=Legendary Creature @@ -16943,8 +16964,8 @@ toughness=5 [/card] [card] name=Caravan Vigil -auto=choice name(put in hand) moveTo(myhand) notatarget(land[basic]|mylibrary) -auto=if morbid then choice name(put in play) moveTo(mybattlefield) notatarget(land[basic]|mylibrary) +aicode=activate target(land[basic]|mylibrary) moveto(myhand) and!(transforms((,newability[if morbid then may moveto(mybattlefield)])) oneshot)! +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>land[basic]|reveal) moveto(myhand) and!(transforms((,newability[if morbid then may moveto(mybattlefield)],newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!])) oneshot)! optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=Search your library for a basic land card, reveal it, put it into your hand then shuffle your library. -- Morbid - You may put that card onto the battlefield instead of putting it into your hand if a creature died this turn. mana={G} type=Sorcery @@ -17426,7 +17447,8 @@ type=Sorcery [/card] [card] name=Cateran Brute -auto={2}{T}:moveTo(myBattlefield) target(mercenary[manacost<=2]|mylibrary) +aicode=activate moveTo(myBattlefield) target(mercenary[manacost<=2]|myLibrary) +auto={2}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(mercenary[manacost<=2]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text={2}, {T}: Search your library for a Mercenary permanent card with converted mana cost 2 or less and put that card onto the battlefield. Then shuffle your library. mana={2}{B} type=Creature @@ -17437,7 +17459,8 @@ toughness=2 [card] name=Cateran Enforcer abilities=fear -auto={4}{T}:moveTo(myBattlefield) target(mercenary[manacost<=4]|mylibrary) +aicode=activate moveTo(myBattlefield) target(mercenary[manacost<=4]|myLibrary) +auto={4}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(mercenary[manacost<=4]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text=Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) -- {4}, {T}: Search your library for a Mercenary permanent card with converted mana cost 4 or less and put that card onto the battlefield. Then shuffle your library. mana={3}{B}{B} type=Creature @@ -17447,7 +17470,8 @@ toughness=3 [/card] [card] name=Cateran Kidnappers -auto={3}{T}:moveTo(myBattlefield) target(mercenary[manacost<=3]|mylibrary) +aicode=activate moveTo(myBattlefield) target(mercenary[manacost<=3]|myLibrary) +auto={3}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(mercenary[manacost<=3]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text={3}, {T}: Search your library for a Mercenary permanent card with converted mana cost 3 or less and put that card onto the battlefield. Then shuffle your library. mana={2}{B}{B} type=Creature @@ -17458,7 +17482,8 @@ toughness=2 [card] name=Cateran Overlord auto={S(creature|myBattlefield)}:regenerate -auto={6}{T}:moveTo(myBattlefield) target(mercenary[manacost<=6]|mylibrary) +aicode=activate moveTo(myBattlefield) target(mercenary[manacost<=6]|myLibrary) +auto={6}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(mercenary[manacost<=6]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text=Sacrifice a creature: Regenerate Cateran Overlord. -- {6}, {T}: Search your library for a Mercenary permanent card with converted mana cost 6 or less and put that card onto the battlefield. Then shuffle your library. mana={4}{B}{B}{B} type=Creature @@ -17468,7 +17493,8 @@ toughness=5 [/card] [card] name=Cateran Persuader -auto={1}{T}:moveTo(myBattlefield) target(mercenary[manacost<=1]|mylibrary) +aicode=activate moveTo(myBattlefield) target(mercenary[manacost<=1]|myLibrary) +auto={1}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(mercenary[manacost<=1]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text={1}, {T}: Search your library for a Mercenary permanent card with converted mana cost 1 or less and put that card onto the battlefield. Then shuffle your library. mana={B}{B} type=Creature @@ -17479,7 +17505,8 @@ toughness=1 [card] name=Cateran Slaver abilities=swampwalk -auto={5}{T}:moveTo(myBattlefield) target(mercenary[manacost<=5]|mylibrary) +aicode=activate moveTo(myBattlefield) target(mercenary[manacost<=5]|myLibrary) +auto={5}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(mercenary[manacost<=5]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text=Swampwalk -- {5}, {T}: Search your library for a Mercenary permanent card with converted mana cost 5 or less and put that card onto the battlefield. Then shuffle your library. mana={4}{B}{B} type=Creature @@ -17489,7 +17516,8 @@ toughness=5 [/card] [card] name=Cateran Summons -auto=moveTo(myHand) notatarget(mercenary|myLibrary) +aicode=activate target(mercenary|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>mercenary|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=Search your library for a Mercenary card, reveal that card, and put it into your hand. Then shuffle your library. mana={B} type=Sorcery @@ -18079,7 +18107,8 @@ toughness=3 [/card] [card] name=Centaur Rootcaster -auto=@combatdamaged(player) from(this):may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto=@combatdamaged(player) from(this):name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend text=Whenever Centaur Rootcaster deals combat damage to a player, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. mana={3}{G} type=Creature @@ -19113,7 +19142,8 @@ toughness=3 [card] name=Chartooth Cougar auto={R}:1/0 -autohand={2}{cycle}:name(mountaincycling) moveTo(myhand) target(mountain|mylibrary) +aicode=activate target(mountain|mylibrary) moveto(myhand) +autohand={2}{cycle}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>mountain|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text={R}: Chartooth Cougar gets +1/+0 until end of turn. -- Mountaincycling {2} ({2}, Discard this card: Search your library for a Mountain card, reveal it, and put it into your hand. Then shuffle your library.) mana={5}{R} type=Creature @@ -20050,19 +20080,8 @@ toughness=1 [/card] [card] name=Citanul Flute -auto={0}{T}:name(X = 0) moveTo(myhand) target(creature[manacost=0]|mylibrary) -auto={1}{T}:name(X = 1) moveTo(myhand) target(creature[manacost<=1]|mylibrary) -auto={2}{T}:name(X = 2) moveTo(myhand) target(creature[manacost<=2]|mylibrary) -auto={3}{T}:name(X = 3) moveTo(myhand) target(creature[manacost<=3]|mylibrary) -auto={4}{T}:name(X = 4) moveTo(myhand) target(creature[manacost<=4]|mylibrary) -auto={5}{T}:name(X = 5) moveTo(myhand) target(creature[manacost<=5]|mylibrary) -auto={6}{T}:name(X = 6) moveTo(myhand) target(creature[manacost<=6]|mylibrary) -auto={7}{T}:name(X = 7) moveTo(myhand) target(creature[manacost<=7]|mylibrary) -auto={8}{T}:name(X = 8) moveTo(myhand) target(creature[manacost<=8]|mylibrary) -auto={9}{T}:name(X = 9) moveTo(myhand) target(creature[manacost<=9]|mylibrary) -auto={10}{T}:name(X = 10) moveTo(myhand) target(creature[manacost<=10]|mylibrary) -auto={11}{T}:name(X = 11) moveTo(myhand) target(creature[manacost<=11]|mylibrary) -auto={12}{T}:name(X = 12) moveTo(myhand) target(creature[manacost<=12]|mylibrary) +aicode=activate target(creature[manacost<=x]|mylibrary) moveto(myhand) +auto={X}{T}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>creature[manacost<=x]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text={X}{T}: Search your library for a creature card with converted mana cost X or less, reveal it, and put it into your hand. Then shuffle your library. type=Artifact mana={5} @@ -20145,7 +20164,8 @@ subtype=Equipment [/card] [card] name=Civic Wayfinder -auto=may moveTo(myHand) target(land[basic]|myLibrary) +aicode=activate target(land[basic]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=When Civic Wayfinder 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={2}{G} type=Creature @@ -21008,7 +21028,8 @@ name=Clutch of the Undercity target=* auto=moveto(ownerhand) auto=life:-3 targetController -autohand={1}{U}{B}{discard}:moveTo(myhand) target(*[manacost=4]|mylibrary) asSorcery +aicode=activate target(*[manacost=4]|mylibrary) moveto(myhand) +autohand={1}{U}{B}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=4]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend asSorcery text=Return target permanent to its owner's hand. Its controller loses 3 life. -- Transmute {1}{U}{B} ({1}{U}{B}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) mana={1}{U}{U}{B} type=Instant @@ -21781,7 +21802,8 @@ toughness=4 [card] name=Conduit of Ruin alias=401847 -autostack=if casted(this) then moveto(myhand) notatarget(creature[colorless;manacost>=7]|mylibrary) +aicode=activate target(creature[colorless;manacost>=7]|mylibrary) moveto(myhand) +autostack=if casted(this) then name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>creature[colorless;manacost>=7]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend auto=lord(creature|mycastingzone) conduited dontremove text=When you cast Conduit of Ruin, you may search your library for a colorless creature card with converted mana cost 7 or greater, reveal it, then shuffle your library and put that card on top of it. -- The first creature spell you cast each turn costs {2} less to cast. mana={6} @@ -21848,7 +21870,8 @@ type=Instant [/card] [card] name=Congregation at Dawn -auto=name(select creatures) moveTo(exile) and!(transforms((,newability[moveto(ownerlibrary)])) oneshot)! notatarget(creature|mylibrary) +aicode=activate notatarget(creature|mylibrary) moveTo(ownerlibrary) and!(moveto(ownerlibrary))! +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose cards) target(creature|reveal) becomes(chosencard) ueot optiononeend optiontwo name(put back) transforms((,newability[target(<3>*[chosencard]|reveal) moveto(mylibrary)],newability[all(*[-chosencard]|reveal) moveto(mylibrary) and!(shuffle)!])) oneshot optiontwoend revealend text=Search your library for up to three creature cards and reveal them. Shuffle your library, then put those cards on top of it in any order. mana={G}{G}{W} type=Instant @@ -22639,7 +22662,8 @@ type=Instant [/card] [card] name=Corpse Connoisseur -auto=may moveTo(mygraveyard) target(creature|myLibrary) +aicode=activate target(creature|mylibrary) moveto(mygraveyard) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(creature|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(mygraveyard)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend autograveyard={4}{B}:moveto(mybattlefield) && transforms((,unearth,haste)) asSorcery forever text=When Corpse Connoisseur enters the battlefield, you may search your library for a creature card and put that card into your graveyard. If you do, shuffle your library. -- Unearth {3}{B} ({3}{B}: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step or if it would leave the battlefield. Unearth only as a sorcery.) mana={4}{B} @@ -23749,7 +23773,8 @@ toughness=1 [/card] [card] name=Crop Rotation -auto=moveTo(mybattlefield) target(land|myLibrary) +aicode=activate moveTo(myBattlefield) target(land[basic]|myLibrary) +auto=name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text=As an additional cost to cast Crop Rotation, sacrifice a land. -- Search your library for a land card and put that card onto the battlefield. Then shuffle your library. mana={G}{S(land|mybattlefield)} type=Instant @@ -26089,7 +26114,8 @@ toughness=1 [card] name=Daru Cavalier abilities=first strike -auto=may moveTo(myhand) target(daru cavalier|mylibrary) +aicode=activate target(daru cavalier|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>daru cavalier|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=First strike -- When Daru Cavalier enters the battlefield, you may search your library for a card named Daru Cavalier, reveal it, and put it into your hand. If you do, shuffle your library. mana={3}{W} type=Creature @@ -26530,7 +26556,8 @@ toughness=4 [/card] [card] name=Dawntreader Elk -auto={G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) && shuffle +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto={G}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend text={G}, Sacrifice Dawntrader Elk: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. mana={1}{G} type=Creature @@ -27542,9 +27569,10 @@ type=Sorcery [/card] [card] name=Deep Reconnaissance -auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) -flashback={4}{G} +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto=name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- Flashback {4}{G} (You may cast this card from your graveyard for its flashback cost. Then exile it.) +flashback={4}{G} mana={2}{G} type=Sorcery [/card] @@ -27837,8 +27865,8 @@ toughness=4 [/card] [card] name=Defense of the Heart -auto=@each my upkeep restriction{type(creature|opponentBattlefield)~morethan~2}:choice target(creature|mylibrary) moveto(mybattlefield) -auto=@each my upkeep restriction{type(creature|opponentBattlefield)~morethan~2}:sacrifice +aicode=activate moveTo(myBattlefield) target(creature|myLibrary) +auto=@each my upkeep restriction{type(creature|opponentBattlefield)~morethan~2}:sacrifice and!( reveal:plibrarycount optionone name(choose card) target(creature|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend )! text=At the beginning of your upkeep, if an opponent controls three or more creatures, sacrifice Defense of the Heart. If you do, search your library for up to two creature cards and put those creatures onto the battlefield. Then shuffle your library. mana={3}{G} type=Enchantment @@ -27883,7 +27911,8 @@ toughness=1 [card] name=Defiant Falcon abilities=flying -auto={4}{T}:moveTo(myBattlefield) target(rebel[manacost<=3]|mylibrary) +aicode=activate moveTo(myBattlefield) target(rebel[manacost<=3]|myLibrary) +auto={4}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(rebel[manacost<=3]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text=Flying -- {4}, {T}: Search your library for a Rebel permanent card with converted mana cost 3 or less and put that card onto the battlefield. Then shuffle your library. mana={1}{W} type=Creature @@ -27935,7 +27964,8 @@ type=Instant name=Defiant Vanguard auto=@combat(blocking) source(this):all(trigger[to]) phaseaction[combatends once] destroy auto=@combat(blocking) source(this) from(creature):all(trigger[from]) phaseaction[combatends once] destroy -auto={5}{T}:moveTo(myBattlefield) target(rebel[manacost<=4]|mylibrary) +aicode=activate moveTo(myBattlefield) target(rebel[manacost<=4]|myLibrary) +auto={5}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(rebel[manacost<=4]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(activate castcard(putinplay))! afterrevealedend revealend text=When Defiant Vanguard blocks, at end of combat, destroy it and all creatures it blocked this turn. -- {5}{T}: Search your library for a Rebel permanent card with converted mana cost 4 or less and put it onto the battlefield. Then shuffle your library. mana={2}{W} type=Creature @@ -28319,7 +28349,8 @@ type=Sorcery [/card] [card] name=Demon's Herald -auto={2}{B}{T}{S(creature[blue]|myBattlefield)}{S(creature[black]|myBattlefield)}{S(creature[red]|myBattlefield)}:moveTo(mybattlefield) target(prince of thralls|mylibrary) +aicode=activate moveTo(myBattlefield) target(prince of thralls|myLibrary) +auto={2}{B}{T}{S(creature[blue]|myBattlefield)}{S(creature[black]|myBattlefield)}{S(creature[red]|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(prince of thralls|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text={2}{B}, {T}, Sacrifice a blue creature, a black creature, and a red creature: Search your library for a card named Prince of Thralls and put it onto the battlefield. Then shuffle your library. mana={B} type=Creature @@ -28428,7 +28459,8 @@ type=Sorcery [card] name=Denying Wind target=player -auto=moveto(exile) target(*|targetedpersonslibrary) +aicode=activate moveto(exile) target(*|targetedpersonslibrary) +auto=name(exile cards) reveal:type:*:targetedpersonslibrary revealzone(targetedpersonslibrary) optionone name(choose card) target(*|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend revealend text=Search target player's library for up to seven cards and exile them. Then that player shuffles his or her library. mana={7}{U}{U} type=Sorcery @@ -29292,7 +29324,8 @@ type=Instant [/card] [card] name=Diligent Farmhand -auto={1}{G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto={1}{G}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield) and!(tap(noevent))!)! afterrevealedend revealend text={1}{G}, Sacrifice Diligent Farmhand: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- If Diligent Farmhand is in a graveyard, effects from spells named Muscle Burst count it as a card named Muscle Burst. mana={G} type=Creature @@ -29403,7 +29436,8 @@ toughness=2 [card] name=Dimir House Guard abilities=fear -autohand={1}{B}{B}{discard}:moveTo(myhand) target(*[manacost=4]|mylibrary) asSorcery +aicode=activate target(*[manacost=4]|mylibrary) moveto(myhand) +autohand={1}{B}{B}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=4]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend asSorcery text=Fear (This creature can't be blocked except by artifact creatures and/or black creatures.) -- Sacrifice a creature: Regenerate Dimir House Guard. -- Transmute {1}{B}{B} ({1}{B}{B}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) mana={3}{B} type=Creature @@ -29414,7 +29448,8 @@ toughness=3 [card] name=Dimir Infiltrator abilities=unblockable -autohand={1}{U}{B}{discard}:moveTo(myhand) target(*[manacost=2]|mylibrary) asSorcery +aicode=activate target(*[manacost=2]|mylibrary) moveto(myhand) +autohand={1}{U}{B}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=2]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend asSorcery text=Dimir Infiltrator is unblockable. -- Transmute {1}{U}{B} ({1}{U}{B}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) mana={U}{B} type=Creature @@ -29434,7 +29469,7 @@ type=Artifact [card] name=Dimir Machinations target=player -aicode=activate choice all(<3>*[zpos<=3]|targetedpersonslibrary) moveto(exile) +aicode=activate choice all(*[zpos<=3]|targetedpersonslibrary) moveto(exile) auto=name(look) reveal:3 revealzone(targetedpersonslibrary) optionone name(Exile Cards) target(*|reveal) moveto(exile) optiononeend optiontwo name(put back) target(<3>*|reveal) moveto(ownerlibrary) optiontwoend revealend autohand={1}{B}{B}{discard}:moveto(myhand) target(*[manacost=3]|mylibrary) asSorcery text=Look at the top three cards of target player's library. Exile any number of those cards, then put the rest back in any order. -- Transmute {1}{B}{B} ({1}{B}{B}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) @@ -30325,7 +30360,8 @@ toughness=4 name=Dizzy Spell target=creature auto=-3/0 -autohand={1}{U}{U}{discard}:moveTo(myhand) target(*[manacost=1]|mylibrary) asSorcery +aicode=activate target(*[manacost=1]|mylibrary) moveto(myhand) +autohand={1}{U}{U}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=1]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend asSorcery text=Target creature gets -3/-0 until end of turn. -- Transmute {1}{U}{U} ({1}{U}{U}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) mana={U} type=Instant @@ -31196,7 +31232,8 @@ toughness=3 [/card] [card] name=Dragon's Herald -auto={2}{R}{T}{S(creature[black]|myBattlefield)}{S(creature[red]|myBattlefield)}{S(creature[green]|myBattlefield)}:moveTo(mybattlefield) target(hellkite overlord|mylibrary) +aicode=activate moveTo(myBattlefield) target(hellkite overlord|myLibrary) +auto={2}{R}{T}{S(creature[black]|myBattlefield)}{S(creature[red]|myBattlefield)}{S(creature[green]|myBattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(hellkite overlord|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text={2}{R}, {T}, Sacrifice a black creature, a red creature, and a green creature: Search your library for a card named Hellkite Overlord and put it onto the battlefield. Then shuffle your library. mana={R} type=Creature @@ -31277,7 +31314,8 @@ toughness=3 [card] name=Dragonstorm abilities=storm -auto=moveTo(myBattlefield) notatarget(dragon|mylibrary) +aicode=activate moveTo(myBattlefield) target(dragon|myLibrary) +auto=name(search card) reveal:plibrarycount optionone name(choose card) target(dragon|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text=Search your library for a Dragon permanent card and put it onto the battlefield. Then shuffle your library. -- Storm (When you cast this spell, copy it for each spell cast before it this turn.) mana={8}{R} type=Sorcery @@ -31799,7 +31837,8 @@ type=Enchantment [/card] [card] name=Dreamscape Artist -auto={2}{U}{T}{S(*|myhand)}{S(land|mybattlefield)}:target(land[basic]|mylibrary) moveTo(mybattlefield) +aicode=activate moveTo(myBattlefield) target(land[basic]|myLibrary) +auto={2}{U}{T}{D(*|myhand)}{S(land|mybattlefield)}:name(search card) reveal:plibrarycount optionone name(choose card) target(land[basic]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerlibrary) and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!(moveTo(myBattlefield))! afterrevealedend revealend text={2}{U}, {T}, Discard a card, Sacrifice a land: Search your library for up to two basic land cards and put them onto the battlefield. Then shuffle your library. mana={1}{U} type=Creature @@ -31908,7 +31947,8 @@ toughness=3 [card] name=Drift of Phantasms abilities=defender,flying -autohand={1}{U}{U}{discard}:moveTo(myhand) target(*[manacost=3]|mylibrary) asSorcery +aicode=activate target(*[manacost=3]|mylibrary) moveto(myhand) +autohand={1}{U}{U}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=3]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend asSorcery text=Defender (This creature can't attack.) -- Flying -- Transmute {1}{U}{U} ({1}{U}{U}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) mana={2}{U} type=Creature @@ -33213,7 +33253,8 @@ toughness=1 [/card] [card] name=Dwarven Recruiter -auto=moveTo(library) target(dwarf|mylibrary) oneshot +aicode=activate notatarget(dwarf|mylibrary) moveTo(ownerlibrary) and!(moveto(ownerlibrary))! +auto=name(search card) Reveal:type:*:mylibrary revealtype(dwarf|mylibrary) revealzone(mylibrary) optionone name(choose cards) target(dwarf|reveal) moveto(exile) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend afterrevealed all(tobecast|myexile) moveto(mylibrary) afterrevealedend revealend text=When Dwarven Recruiter enters the battlefield, search your library for any number of Dwarf cards and reveal those cards. Shuffle your library, then put them on top of it in any order. mana={2}{R} type=Creature @@ -50769,7 +50810,7 @@ abilities=defender auto=moveTo(myhand) target(*[manacost=9]|myLibrary) auto={4}:-defender aicode=activate target(*[manacost=9]|mylibrary) moveto(myhand) -autohand={1}{U}{U}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=9]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend +autohand={1}{U}{U}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=9]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend asSorcery text=Defender (This creature can't attack.) -- When Grozoth enters the battlefield, you may search your library for any number of cards that have converted mana cost 9, reveal them, and put them into your hand. If you do, shuffle your library. -- {4}: Grozoth loses defender until end of turn. -- Transmute {1}{U}{U} ({1}{U}{U}, Discard this card: Search your library for a card with the same converted mana cost as this card, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) mana={6}{U}{U}{U} type=Creature @@ -77969,7 +78010,7 @@ toughness=2 [/card] [card] name=Nath of the Gilt-Leaf -auto=@each my upkeep:may discard:1 opponent +auto=@each my upkeep:may discard:1 target(opponent) auto=@discarded(*|opponenthand):may token(Elf Warrior,Creature Elf Warrior,1/1,green) text=At the beginning of your upkeep, you may have target opponent discard a card at random. -- Whenever an opponent discards a card, you may put a 1/1 green Elf Warrior creature token onto the battlefield. mana={3}{B}{G} @@ -121792,7 +121833,7 @@ name=Tolaria West auto=tap(noevent) auto={T}:Add{U} aicode=activate target(*[manacost=0]|mylibrary) moveto(myhand) -autohand={1}{U}{U}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=0]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend +autohand={1}{U}{U}{discard}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[manacost=0]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend asSorcery text=Tolaria West enters the battlefield tapped. -- {T}: Add {U} to your mana pool. -- Transmute {1}{U}{U} ({1}{U}{U}, Discard this card: Search your library for a card with converted mana cost 0, reveal it, and put it into your hand. Then shuffle your library. Transmute only as a sorcery.) type=Land [/card] diff --git a/projects/mtg/bin/Res/test/Armillary_Sphere.txt b/projects/mtg/bin/Res/test/Armillary_Sphere.txt index a2042d0be..c779962cd 100644 --- a/projects/mtg/bin/Res/test/Armillary_Sphere.txt +++ b/projects/mtg/bin/Res/test/Armillary_Sphere.txt @@ -10,6 +10,7 @@ manapool:{2} [PLAYER2] [DO] Armillary Sphere +choice 0 island forest [ASSERT] diff --git a/projects/mtg/bin/Res/test/Armillary_Sphere2.txt b/projects/mtg/bin/Res/test/Armillary_Sphere2.txt index 90bda50d5..4a2bed3ae 100644 --- a/projects/mtg/bin/Res/test/Armillary_Sphere2.txt +++ b/projects/mtg/bin/Res/test/Armillary_Sphere2.txt @@ -4,20 +4,20 @@ Wished result's answer: YES. [INIT] FIRSTMAIN [PLAYER1] -library:forest,island +library:tundra,island inplay:Armillary Sphere manapool:{2} [PLAYER2] [DO] Armillary Sphere +choice 0 island -Armillary Sphere [ASSERT] FIRSTMAIN [PLAYER1] graveyard:Armillary Sphere hand:island -library:forest +library:tundra manapool:{0} [PLAYER2] [END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/academy_rector.txt b/projects/mtg/bin/Res/test/academy_rector.txt index 484790c38..a94c94ee4 100644 --- a/projects/mtg/bin/Res/test/academy_rector.txt +++ b/projects/mtg/bin/Res/test/academy_rector.txt @@ -10,6 +10,7 @@ manapool:{R} Shock Academy Rector choice 0 +choice 0 Gaea'S Anthem [ASSERT] firstmain diff --git a/projects/mtg/include/GameOptions.h b/projects/mtg/include/GameOptions.h index df873da68..6b2187b5b 100644 --- a/projects/mtg/include/GameOptions.h +++ b/projects/mtg/include/GameOptions.h @@ -46,6 +46,7 @@ public: CHEATMODEAIDECK, OSD, BLKBORDER, + SHOWTOKENS, CLOSEDHAND, HANDDIRECTION, MANADISPLAY, diff --git a/projects/mtg/include/WFilter.h b/projects/mtg/include/WFilter.h index 0a246925b..a7f57e8d3 100644 --- a/projects/mtg/include/WFilter.h +++ b/projects/mtg/include/WFilter.h @@ -233,8 +233,8 @@ public: ; WCFilterSet(string arg); bool isMatch(MTGCard *c) - { - return (setid == MTGSets::ALL_SETS || c->setId == setid) && (c->getRarity() != Constants::RARITY_T); //removes viewing of card tokens. tokens will not display on spoiler and should not affect gameplay :) + {//exclude negative id's and tokens + return (setid == MTGSets::ALL_SETS || c->setId == setid) && ((c->getId() > 0) && (c->getRarity() != Constants::RARITY_T)); } ; string getCode(); diff --git a/projects/mtg/include/WGui.h b/projects/mtg/include/WGui.h index e3c5a19ef..6c780a049 100644 --- a/projects/mtg/include/WGui.h +++ b/projects/mtg/include/WGui.h @@ -626,7 +626,7 @@ protected: class WGuiSplit: public WGuiItem { public: - WGuiSplit(WGuiBase* _left, WGuiBase* _right); + WGuiSplit(WGuiBase* _left, WGuiBase* _right, bool custom = false); virtual ~WGuiSplit(); virtual bool yieldFocus(); diff --git a/projects/mtg/src/GameOptions.cpp b/projects/mtg/src/GameOptions.cpp index aa9d7219b..2d4b1c81e 100644 --- a/projects/mtg/src/GameOptions.cpp +++ b/projects/mtg/src/GameOptions.cpp @@ -22,6 +22,7 @@ const string Options::optionNames[] = { "cheatmodedecks", "displayOSD", "BlackBorder", + "ShowTokens", "closed_hand", "hand_direction", "mana_display", diff --git a/projects/mtg/src/GameStateOptions.cpp b/projects/mtg/src/GameStateOptions.cpp index 4a7d2d401..08044077e 100644 --- a/projects/mtg/src/GameStateOptions.cpp +++ b/projects/mtg/src/GameStateOptions.cpp @@ -57,6 +57,7 @@ void GameStateOptions::Start() optionsList = NEW WGuiList("Game"); optionsList->Add(NEW WGuiHeader("Interface Options")); optionsList->Add(NEW OptionInteger(Options::BLKBORDER, "All Black Border")); + optionsList->Add(NEW OptionInteger(Options::SHOWTOKENS, "Show Tokens in Editor")); optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::CLOSEDHAND, "Closed hand", 1, 1, 0))); optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::HANDDIRECTION, "Hand direction", 1, 1, 0))); optionsList->Add(NEW WDecoEnum(NEW OptionInteger(Options::MANADISPLAY, "Mana display", 3, 1, 0))); diff --git a/projects/mtg/src/GuiStatic.cpp b/projects/mtg/src/GuiStatic.cpp index 877cc858c..845628f86 100644 --- a/projects/mtg/src/GuiStatic.cpp +++ b/projects/mtg/src/GuiStatic.cpp @@ -28,12 +28,18 @@ GuiAvatar::GuiAvatar(float x, float y, bool hasFocus, Player * player, Corner co void GuiAvatar::Render() { + GameObserver * game = player->getObserver(); JRenderer * r = JRenderer::GetInstance(); int life = player->life; int poisonCount = player->poisonCount; int energyCount = player->energyCount; WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); + TargetChooser * tc = NULL; + + if (game) + tc = game->getCurrentTargetChooser(); + //Avatar int lifeDiff = life - currentLife; if (lifeDiff < 0 && currentLife > 0) @@ -74,6 +80,10 @@ void GuiAvatar::Render() break; } player->getIcon()->SetColor(ARGB((int)actA, 255, avatarRed, avatarRed)); + if (tc && !tc->canTarget(player)) + { + player->getIcon()->SetColor(ARGB((int)actA, 50, 50, 50)); + } r->RenderQuad(player->getIcon().get(), actX, actY, actT, Width/player->getIcon()->mWidth*actZ, Height/player->getIcon()->mHeight*actZ); if (mHasFocus) { diff --git a/projects/mtg/src/WDataSrc.cpp b/projects/mtg/src/WDataSrc.cpp index a29e13f34..59069f5b1 100644 --- a/projects/mtg/src/WDataSrc.cpp +++ b/projects/mtg/src/WDataSrc.cpp @@ -296,7 +296,14 @@ void WSrcCards::validate() if (!filtersRoot) return; for (size_t t = 0; t < cards.size(); t++) { - if (matchesFilters(cards[t])) validated.push_back(t); + if(!options[Options::SHOWTOKENS].number) + {//don't add tokens or negative id + if (matchesFilters(cards[t]) && (cards[t]->getId() > 0) && (cards[t]->getRarity() != Constants::RARITY_T)) validated.push_back(t); + } + else + {//show but you cant add + if (matchesFilters(cards[t])) validated.push_back(t); + } } } @@ -392,7 +399,14 @@ WSrcUnlockedCards::WSrcUnlockedCards(float delay) : for (it = ac->collection.begin(); it != ac->collection.end(); it++) { - if (it->second && unlocked[it->second->setId]) cards.push_back(it->second); + if(!options[Options::SHOWTOKENS].number) + {//dont show tokens & negative id's + if (it->second && unlocked[it->second->setId] && (it->second->getId() > 0) && (it->second->getRarity() != Constants::RARITY_T)) cards.push_back(it->second); + } + else + {//show but you cant add + if (it->second && unlocked[it->second->setId]) cards.push_back(it->second); + } } if (unlocked) { @@ -416,10 +430,21 @@ int WSrcDeck::loadMatches(MTGDeck * deck) for (it = deck->cards.begin(); it != deck->cards.end(); it++) { MTGCard * c = deck->getCardById(it->first); - if (c && matchesFilters(c)) - { - Add(c, it->second); - count++; + if(!options[Options::SHOWTOKENS].number) + {//dont show tokens & negative id's + if (c && matchesFilters(c) && (c->getId() > 0) && (c->getRarity() != Constants::RARITY_T)) + { + Add(c, it->second); + count++; + } + } + else + {//show but you cant add + if (c && matchesFilters(c)) + { + Add(c, it->second); + count++; + } } } validate(); diff --git a/projects/mtg/src/WGui.cpp b/projects/mtg/src/WGui.cpp index 5a0e83639..f2f1758bf 100644 --- a/projects/mtg/src/WGui.cpp +++ b/projects/mtg/src/WGui.cpp @@ -692,13 +692,16 @@ PIXEL_TYPE WGuiButton::getColor(int type) } ; -WGuiSplit::WGuiSplit(WGuiBase* _left, WGuiBase* _right) : +WGuiSplit::WGuiSplit(WGuiBase* _left, WGuiBase* _right, bool custom) : WGuiItem("") { right = _right; left = _left; bRight = false; - percentRight = 0.5f; + if(!custom) + percentRight = 0.5f; + else + percentRight = 0.67f; if (!left->Selectable()) bRight = true; } WGuiSplit::~WGuiSplit() @@ -1770,14 +1773,18 @@ void WGuiFilters::buildList() { list = NEW WGuiList(""); WGuiButton * l = NEW WGuiButton(NEW WGuiItem("Add Filter"), -102, -10, this); - WGuiButton * r = NEW WGuiButton(NEW WGuiItem("Search"), -102, -11, this); + WGuiButton * r = NEW WGuiButton(NEW WGuiItem("Return"), -102, -11, this); WGuiButton * mid = NEW WGuiButton(NEW WGuiItem("Clear"), -102, -66, this); - //WGuiSplit * sub = NEW WGuiSplit(mid, r); - //WGuiSplit * wgs = NEW WGuiSplit(l, sub); - WGuiSplit * wgs = NEW WGuiSplit(mid, r); + WGuiSplit * sub = NEW WGuiSplit(mid, r); + sub->setHeight(25); + sub->setWidth(240); + l->setHeight(25); + l->setWidth(160); + WGuiSplit * wgs = NEW WGuiSplit(l, sub, true); + //WGuiSplit * wgs = NEW WGuiSplit(mid, r); subMenu = NULL; list->Add(NEW WGuiHeader(displayValue)); - list->Add(l); + //list->Add(l); list->Add(wgs); list->Entering(JGE_BTN_NONE); }