From e855ca72aa80741ca3ec215980d28a77bfb60d20 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 27 Jul 2016 01:44:18 +0800 Subject: [PATCH] Fix Mirror Gallery & enters "tapped" cards If Mirror Gallery leaves play, you must check for legendary status. Fix some cards that enters tapped. --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 188 +++++++++---------- projects/mtg/include/GameObserver.h | 2 + projects/mtg/src/GameObserver.cpp | 45 ++++- projects/mtg/src/MTGRules.cpp | 2 +- 4 files changed, 141 insertions(+), 96 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 9ad6cc6e3..383e7190b 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -3766,7 +3766,7 @@ subtype=Aura [/card] [card] name=Animist's Awakening -auto=if type(*[instant;sorcery]|mygraveyard)~lessthan~2 then reveal:x optionone all(land|reveal) moveto(mybattlefield) and!(tap)! optiononeend optiontwo name(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshotoptiontwoend revealend +auto=if type(*[instant;sorcery]|mygraveyard)~lessthan~2 then reveal:x optionone all(land|reveal) moveto(mybattlefield) and!(tap(noevent))! optiononeend optiontwo name(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshotoptiontwoend revealend auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then reveal:x optionone all(land|reveal) moveto(mybattlefield) optiononeend optiontwo nname(bottom of library) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshot optiontwoend revealendd text=Reveal the top X cards of your library. Put all land cards from among them onto the battlefield tapped and the rest on the bottom of your library in a random order. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, untap those lands. mana={X}{G} @@ -8131,7 +8131,7 @@ type=Instant [card] name=Bant Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(forest,plains,island|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(forest,plains,island|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Bant Panorama: Search your library for a basic Forest, Plains, or Island card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -10671,7 +10671,7 @@ type=Land [card] name=Blighted Woodland auto={T}:add{1} -auto={3}{G}{T}{S}:moveto(mybattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto={3}{G}{T}{S}:moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) 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] @@ -10747,7 +10747,7 @@ toughness=3 [card] name=Blind Obedience auto=@movedto(*|mystack):pay({WB}) life:-1 opponent && life:1 controller -auto=@movedTo(creature,artifact|opponentBattlefield):all(trigger) tap +auto=lord(artifact,creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Extort (Whenever you cast a spell, you may pay {WB}. If you do, each opponent loses 1 life and you gain that much life.) -- Artifacts and creatures your opponents control enter the battlefield tapped. mana={1}{W} type=Enchantment @@ -12215,7 +12215,7 @@ toughness=4 [/card] [card] name=Bogbrew Witch -auto={2}{T}:moveTo(myBattlefield) and!(tap)! target(Festering Newt,Bubbling Cauldron|mylibrary) +auto={2}{T}:moveTo(myBattlefield) and!(tap(noevent))! target(Festering Newt,Bubbling Cauldron|mylibrary) 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 @@ -13114,7 +13114,7 @@ toughness=3 [/card] [card] name=Boundless Realms -auto=moveTo(mybattlefield) and!(tap)! notatarget(land|mylibrary) +auto=moveTo(mybattlefield) and!(tap(noevent))! notatarget(land|mylibrary) 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 @@ -14635,7 +14635,7 @@ toughness=2 [/card] [card] name=Burnished Hart -auto={3}{S}:notatarget(land[basic]|mylibrary) and!(tap)! moveTo(mybattlefield) +auto={3}{S}:notatarget(land[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) 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 @@ -16787,7 +16787,7 @@ toughness=3 [/card] [card] name=Centaur Rootcaster -auto=@combatdamaged(player) from(this):may moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=@combatdamaged(player) from(this):may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) 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 @@ -18289,7 +18289,7 @@ toughness=1 [/card] [card] name=Chronosavant -autograveyard={1}{W}:turns:-1 controller && moveTo(mybattlefield) and!(tap)! +autograveyard={1}{W}:turns:-1 controller && moveTo(mybattlefield) and!(tap(noevent))! text={1}{W}: Return Chronosavant from your graveyard to the battlefield tapped. You skip your next turn. mana={5}{W} type=Creature @@ -22885,7 +22885,7 @@ toughness=3 [/card] [card] name=Cultivate -auto=name(fetch to play) notatarget(land[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(land[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap)!])) oneshot +auto=name(fetch to play) notatarget(land[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(land[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot text=Search your library for up to two basic land cards, reveal those cards, and put one onto the battlefield tapped and the other in your hand. Then shuffle your library. mana={2}{G} type=Sorcery @@ -24573,7 +24573,7 @@ toughness=4 [/card] [card] name=Dawntreader Elk -auto={G}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) && shuffle +auto={G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) && shuffle 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 @@ -25503,7 +25503,7 @@ type=Sorcery [/card] [card] name=Deep Reconnaissance -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) flashback={4}{G} 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.) mana={2}{G} @@ -27121,7 +27121,7 @@ type=Instant [/card] [card] name=Diligent Farmhand -auto={1}{G}{S}:moveTo(myBattlefield) and!(tap)! target(land[basic]|myLibrary) +auto={1}{G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) 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 @@ -30028,7 +30028,7 @@ toughness=4 [card] name=Drownyard Temple auto={T}:Add{1} -autograveyard={3}:moveto(mybattlefield) and!(tap)! +autograveyard={3}:moveto(mybattlefield) and!(tap(noevent))! text={T}: Add {1} to your mana pool. -- {3}: Return Drownyard Temple from your graveyard to the battlefield tapped. type=Land [/card] @@ -30231,7 +30231,7 @@ toughness=1 [/card] [card] name=Due Respect -auto=emblem transforms((,newability[@movedTo(*|Battlefield):all(trigger) tap])) ueot +auto=emblem transforms((,newability[@movedTo(*|Battlefield):all(trigger) tap(noevent)])) ueot auto=draw:1 controller mana={1}{W} type=Instant @@ -31664,7 +31664,7 @@ toughness=9 [/card] [card] name=Eldrazi Displacer -auto={c}{2}:target(creature) (blink) and!(tap)! +auto={c}{2}:target(creature) (blink) and!(tap(noevent))! text=Devoid (This card has no color.) -- {2}{C}: Exile another target creature, then return it to the battlefield tapped under its owner's control. ({C} represents colorless mana.) mana={2}{W} abilities=devoid @@ -32418,7 +32418,7 @@ toughness=2 [/card] [card] name=Elvish Pioneer -auto=may moveTo(myBattlefield) and!(tap)! target(land[basic]|myhand) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myhand) text=When Elvish Pioneer enters the battlefield, you may put a basic land card from your hand onto the battlefield tapped. mana={G} type=Creature @@ -32730,7 +32730,7 @@ toughness=4 [/card] [card] name=Embodiment of Spring -auto={1}{G}{T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={1}{G}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text={1}{G}{T}:Sacrifice Embodiment of Spring: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. mana={U} type=Creature @@ -34082,7 +34082,7 @@ toughness=3 [card] name=Esper Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(plains,island,swamp|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(plains,island,swamp|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Esper Panorama: Search your library for a basic Plains, Island, or Swamp card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -34577,7 +34577,7 @@ type=Sorcery [/card] [card] name=Everbark Shaman -auto={T}{E(treefolk|mygraveyard)}:target(<2>forest|mylibrary) and!(tap)! moveTo(mybattlefield) +auto={T}{E(treefolk|mygraveyard)}:target(<2>forest|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) text={T}, Exile a Treefolk card from your graveyard: Search your library for two Forest cards and put them onto the battlefield tapped. Then shuffle your library. mana={4}{G} type=Creature @@ -34716,7 +34716,7 @@ type=Enchantment [/card] [card] name=Evolving Wilds -auto={T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text={T}, Sacrifice Evolving Wilds: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -35008,7 +35008,7 @@ type=Sorcery [card] name=Explorer's Scope auto={1}:equip -auto=@combat(attacking) source(mytgt):reveal:1 optionone target(land|reveal) moveto(mybattlefield) and!(tap)! optiononeend optiontwo name(Put Back) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend +auto=@combat(attacking) source(mytgt):reveal:1 optionone target(land|reveal) moveto(mybattlefield) and!(tap(noevent))! optiononeend optiontwo name(Put Back) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend text=Whenever equipped creature attacks, look at the top card of your library. If it's a land card, you may put it onto the battlefield tapped. -- Equip {1} ({1}: Attach to target creature you control. Equip only as a sorcery.) mana={1} type=Artifact @@ -35048,7 +35048,7 @@ type=Sorcery [/card] [card] name=Explosive Vegetation -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) text=Search your library for up to two basic land cards and put them onto the battlefield tapped. Then shuffle your library. mana={3}{G} type=Sorcery @@ -35972,8 +35972,8 @@ type=Sorcery [/card] [card] name=Far Wanderings -auto=if type(*|mygraveyard)~morethan~6 then moveto(mybattlefield) and!(tap)! target(<3>land[basic]|mylibrary) -auto=ifnot type(*|mygraveyard)~morethan~6 then moveto(mybattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=if type(*|mygraveyard)~morethan~6 then moveto(mybattlefield) and!(tap(noevent))! target(<3>land[basic]|mylibrary) +auto=ifnot type(*|mygraveyard)~morethan~6 then moveto(mybattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- Threshold - If seven or more cards are in your graveyard, instead search your library for three basic land cards and put them onto the battlefield tapped. Then shuffle your library. mana={2}{G} type=Sorcery @@ -36010,7 +36010,7 @@ toughness=3 [/card] [card] name=Farhaven Elf -auto=may moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text=When Farhaven Elf enters the battlefield, you may search your library for a basic land card and put it onto the battlefield tapped. If you do, shuffle your library. mana={2}{G} type=Creature @@ -36058,7 +36058,7 @@ toughness=2 [/card] [card] name=Farseek -auto=moveto(myBattlefield) and!(tap)! notatarget(plains,island,swamp,mountain|mylibrary) +auto=moveto(myBattlefield) and!(tap(noevent))! notatarget(plains,island,swamp,mountain|mylibrary) text=Search your library for a Plains, Island, Swamp, or Mountain card and put it onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Sorcery @@ -36799,7 +36799,7 @@ type=Sorcery [card] name=Fertilid auto=counter(1/1,2) -auto={1}{G}{C(1/1,-1)}:moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto={1}{G}{C(1/1,-1)}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=Fertilid enters the battlefield with two +1/+1 counters on it. -- {1}{G}, Remove a +1/+1 counter from Fertilid: Target player searches his or her library for a basic land card and puts it onto the battlefield tapped. Then that player shuffles his or her library. mana={2}{G} type=Creature @@ -37792,7 +37792,7 @@ type=Enchantment [card] name=Flagstones of Trokair auto={T}:Add{W} -auto=@movedTo(this|graveyard) from(battlefield):may moveTo(myBattlefield) and!(tap)! target(plains|mylibrary) +auto=@movedTo(this|graveyard) from(battlefield):may moveTo(myBattlefield) and!(tap(noevent))! target(plains|mylibrary) text={T}: Add {W} to your mana pool. -- When Flagstones of Trokair is put into a graveyard from the battlefield, you may search your library for a Plains card and put it onto the battlefield tapped. If you do, shuffle your library. type=Legendary Land [/card] @@ -39161,7 +39161,7 @@ toughness=4 [/card] [card] name=Font of Fertility -auto={1}{G}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) && shuffle +auto={1}{G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) && shuffle text={1}{G}, Sacrifice Font of Fertility: Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. mana={1}{G} type=Enchantment @@ -40016,7 +40016,7 @@ toughness=1 name=Frenzied Tilling target=land auto=destroy -auto=target(land[basic]|mylibrary) and!(tap)! moveto(mybattlefield) +auto=target(land[basic]|mylibrary) and!(tap(noevent))! moveto(mybattlefield) text=Destroy target land. Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={3}{R}{G} type=Sorcery @@ -40177,7 +40177,7 @@ type=Land [/card] [card] name=Frontier Guide -auto={3}{G}{T}:moveTo(myBattlefield) and!(tap)! target(land[basic]|myLibrary) +auto={3}{G}{T}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) text={3}{G}, {T}: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Creature @@ -40339,7 +40339,7 @@ toughness=3 [/card] [card] name=Frozen AEther -auto=@movedTo(creature,artifact,land|opponentBattlefield):all(trigger) tap +auto=lord(artifact,creature,land|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Artifacts, creatures, and lands your opponents control enter the battlefield tapped. mana={3}{U} type=Enchantment @@ -41777,7 +41777,7 @@ type=Land name=Geralf's Masterpiece abilities=flying auto=foreach(*|myhand):-1/-1 -autograveyard={3}{U}{discard(*|myhand)}{discard(*|myhand)}{discard(*|myhand)}:moveto(myhand) and!(tap)! +autograveyard={3}{U}{discard(*|myhand)}{discard(*|myhand)}{discard(*|myhand)}:moveto(myhand) and!(tap(noevent))! text=Flying -- Geralf's Masterpiece gets -1/-1 for each card in your hand. -- {3}{U}, Discard three cards: Return Geralf's Masterpiece from your graveyard to the battlefield tapped. mana={3}{U}{U} type=Creature @@ -42400,7 +42400,7 @@ type=Instant [/card] [card] name=Ghoulsteed -auto={2}{B}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap)! +auto={2}{B}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! text={2}{B}, Discard two cards: Return Ghoulsteed from your graveyard to the battlefield tapped. mana={4}{B} type=Creature @@ -46667,7 +46667,7 @@ toughness=1 [card] name=Grixis Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(island,swamp,mountain|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(island,swamp,mountain|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Grixis Panorama: Search your library for a basic Island, Swamp, or Mountain card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -46926,7 +46926,7 @@ type=Enchantment [/card] [card] name=Growth Spasm -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|myLibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|myLibrary) auto=Token(-193507) text=Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. -- Put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} @@ -51985,7 +51985,7 @@ subtype=Elf [card] name=Hunting Wilds target=forest|mylibrary -auto=moveto(mybattlefield) and!(tap)! +auto=moveto(mybattlefield) and!(tap(noevent))! kicker={3}{G} auto=kicker untap && becomes(Creature,3/3,haste,green) forever text=Kicker {3}{G} (You may pay an additional {3}{G} as you cast this spell.) -- Search your library for up to two Forest cards and put them onto the battlefield tapped. Then shuffle your library. -- If Hunting Wilds was kicked, untap all Forests put onto the battlefield this way. They become 3/3 green creatures with haste that are still lands. @@ -52958,7 +52958,7 @@ type=Sorcery [/card] [card] name=Imposing Sovereign -auto=@movedTo(creature|opponentBattlefield):all(trigger) tap +auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures your opponents control enter the battlefield tapped. mana={1}{W} type=Creature @@ -54139,7 +54139,7 @@ type=Sorcery [/card] [card] name=Into the North -auto=moveto(mybattlefield) and!(tap)! notatarget(land[snow]|mylibrary) +auto=moveto(mybattlefield) and!(tap(noevent))! notatarget(land[snow]|mylibrary) text=Search your library for a snow land card and put it onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Sorcery @@ -56027,7 +56027,7 @@ toughness=1 [card] name=Jund Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(swamp,mountain,forest|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(swamp,mountain,forest|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Jund Panorama: Search your library for a basic Swamp, Mountain, or Forest card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -56789,7 +56789,7 @@ name=Karametra, God of Harvests abilities=indestructible auto=this(variable{selesnya}<7) transforms((removetypes,newability[becomes(Legendary Enchantment God)])) auto=this(variable{selesnya}>6) transforms((Legendary Enchantment Creature)) -auto=@movedto(creature|stack) from(*|myhand):moveTo(myBattlefield) and!(tap)! target(forest,plains|mylibrary) +auto=@movedto(creature|stack) from(*|myhand):moveTo(myBattlefield) and!(tap(noevent))! target(forest,plains|mylibrary) text=Indestructible -- As long as your devotion to green and white is less than seven, Karametra isn't a creature. -- Whenever you cast a creature spell, you may search your library for a Forest or Plains card, put it onto the battlefield tapped, then shuffle your library. mana={3}{G}{W} type=Legendary Enchantment Creature @@ -57823,7 +57823,7 @@ type=Artifact [card] name=Khalni Heart Expedition auto=@movedto(land|myBattlefield):counter(0/0,1,Quest) -auto={C(0/0,-3,Quest)}{S}:target(land[basic]|mylibrary) and!(tap)! moveTo(mybattlefield) +auto={C(0/0,-3,Quest)}{S}:target(land[basic]|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) text=Landfall - Whenever a land enters the battlefield under your control, you may put a quest counter on Khalni Heart Expedition. -- Remove three quest counters from Khalni Heart Expedition and sacrifice it: Search your library for up to two basic land cards, put them onto the battlefield tapped, then shuffle your library. mana={1}{G} type=Enchantment @@ -58232,7 +58232,7 @@ type=Sorcery [/card] [card] name=Kismet -auto=@movedTo(creature,artifact,land|opponentBattlefield):all(trigger) tap +auto=lord(artifact,creature,land|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Artifacts, creatures, and lands your opponents control enter the battlefield tapped. mana={3}{W} type=Enchantment @@ -58953,7 +58953,7 @@ toughness=4 [/card] [card] name=Kodama's Reach -auto=name(fetch to play) notatarget(land[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(land[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap)!])) oneshot +auto=name(fetch to play) notatarget(land[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(land[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot text=Search your library for two basic land cards, reveal those cards, and put one onto the battlefield tapped and the other into your hand. Then shuffle your library. mana={2}{G} type=Sorcery @@ -59139,7 +59139,7 @@ toughness=2 [/card] [card] name=Kor Cartographer -auto=may moveTo(myBattlefield) and!(tap)! target(plains|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(plains|mylibrary) text=When Kor Cartographer enters the battlefield, you may search your library for a Plains card, put it onto the battlefield tapped, then shuffle your library. mana={3}{W} type=Creature @@ -59290,7 +59290,7 @@ toughness=1 [/card] [card] name=Korlash, Heir to Blackblade -auto={discard(other *[share!name!]|myhand)}:moveto(mybattlefield) and!(tap)! target(swamp|mylibrary) +auto={discard(other *[share!name!]|myhand)}:moveto(mybattlefield) and!(tap(noevent))! target(swamp|mylibrary) anyzone=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. @@ -62812,7 +62812,7 @@ toughness=2 [/card] [card] name=Loam Dweller -auto=@movedto(arcane,spirit|mystack):may moveto(myBattlefield) and!(tap)! target(land|myhand) +auto=@movedto(arcane,spirit|mystack):may moveto(myBattlefield) and!(tap(noevent))! target(land|myhand) text=Whenever you cast a Spirit or Arcane spell, you may put a land card from your hand onto the battlefield tapped. mana={1}{G} type=Creature @@ -63433,7 +63433,7 @@ toughness=2 [/card] [card] name=Loxodon Gatekeeper -auto=@movedTo(creature,artifact,land|opponentBattlefield):all(trigger) tap +auto=lord(artifact,creature,land|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Artifacts, creatures, and lands your opponents control enter the battlefield tapped. mana={2}{W}{W} type=Creature @@ -65438,7 +65438,7 @@ subtype=Aura [/card] [card] name=Map the Wastes -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|myLibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|myLibrary) auto=ability$!name(Bolster) notatarget(creature[toughness=toughness:lowest:creature:mybattlefield]|mybattlefield) counter(1/1,1)!$ controller text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. -- Bolster 1. (Choose a creature with the least toughness among creatures you control and put a +1/+1 counter on it.) mana={2}{G} @@ -71524,7 +71524,7 @@ subtype=Aura name=Mwonvuli Acid-Moss target=land auto=destroy -auto=target(forest|mylibrary) moveto(mybattlefield) and!(tap)! +auto=target(forest|mylibrary) moveto(mybattlefield) and!(tap(noevent))! text=Destroy target land. Search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library. mana={2}{G}{G} type=Sorcery @@ -72405,7 +72405,7 @@ type=Instant [/card] [card] name=Natural Connection -auto=moveto(mybattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto=moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) text=Search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. mana={2}{G} type=Instant @@ -72602,7 +72602,7 @@ toughness=1 [card] name=Naya Panorama auto={T}:Add{1} -auto={1}{T}{S}:moveTo(myBattlefield) and!(tap)! target(mountain,forest,plains|mylibrary) +auto={1}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(mountain,forest,plains|mylibrary) text={T}: Add {1} to your mana pool. -- {1}, {T}, Sacrifice Naya Panorama: Search your library for a basic Mountain, Forest, or Plains card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -74221,14 +74221,14 @@ type=Sorcery [/card] [card] name=Nissa's Pilgrimage -auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap)!])) oneshot else name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap)!])) oneshot +auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot else name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot text=Search your library for up to two basic Forest cards, reveal those cards, and put one onto the battlefield tapped and the rest into your hand. Then shuffle your library. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, search your library for up to three basic Forest cards instead of two. mana={2}{G} type=Sorcery [/card] [card] name=Nissa's Renewal -auto=moveto(mybattlefield) and!(tap)! notatarget(land[basic]|mylibrary) +auto=moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) auto=life:7 controller text=Search your library for up to three basic land cards, put them onto the battlefield tapped, then shuffle your library. You gain 7 life. mana={5}{G} @@ -75786,7 +75786,7 @@ toughness=3 name=Ojutai Exemplars auto=@movedto(*[-creature]|mystack):choice name(Tap target creature) tap target(creature|battlefield) auto=@movedto(*[-creature]|mystack):choice name(First Strike and Lifelink) transforms((,newability[first strike ueot],newability[lifelink ueot])) ueot -auto=@movedto(*[-creature]|mystack):choice name(Exile and returned tapped) moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield) and!(tap)!])) forever)! +auto=@movedto(*[-creature]|mystack):choice name(Exile and returned tapped) moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield) and!(tap(noevent))!])) forever)! text=Whenever you cast a noncreature spell, choose one ? -- ? Tap target creature. -- ? Ojutai Exemplars gains first strike and lifelink until end of turn. -- ? Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control. mana={2}{W}{W} type=Creature @@ -75977,7 +75977,7 @@ toughness=1 [/card] [card] name=Ondu Giant -auto=may moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text=When Ondu Giant enters the battlefield, search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={3}{G} type=Creature @@ -76048,7 +76048,7 @@ subtype=Aura [card] name=One with Nature target=creature -auto=@damaged(player) from(mytgt):may moveto(myBattlefield) and!(tap)! target(land[basic]|myLibrary) +auto=@damaged(player) from(mytgt):may moveto(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) text=Enchant creature -- Whenever enchanted creature deals combat damage to a player, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. mana={G} type=Enchantment @@ -76501,7 +76501,7 @@ toughness=3 [/card] [card] name=Orb of Dreams -auto=@movedTo(*|Battlefield):all(trigger) tap +auto=lord(*|battlefield) transforms((,newability[tap(noevent)])) text=Permanents enter the battlefield tapped. mana={3} type=Artifact @@ -78279,7 +78279,7 @@ type=Sorcery [card] name=Path to Exile target=creature -auto=transforms((,newability[moveto(exile)],newability[may name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!(tap)!])) oneshot +auto=transforms((,newability[moveto(exile)],newability[may name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!(tap(noevent))!])) oneshot text=Exile target creature. Its controller may search his or her library for a basic land card, put that card onto the battlefield tapped, then shuffle his or her library. mana={W} type=Instant @@ -78362,7 +78362,7 @@ toughness=6 name=Patron of the Moon other={kmoonfolk} name(Moonfolk Offering) abilities=flying,offering -auto={1}:name(put 2 lands in play) moveto(mybattlefield) and!(tap)! notatarget(land|myhand) +auto={1}:name(put 2 lands in play) moveto(mybattlefield) and!(tap(noevent))! notatarget(land|myhand) text=Moonfolk offering (You may cast this card any time you could cast an instant by sacrificing a Moonfolk and paying the difference in mana costs between this and the sacrificed Moonfolk. Mana cost includes color.) -- Flying -- {1}: Put up to two land cards from your hand onto the battlefield tapped. mana={5}{U}{U} type=Legendary Creature @@ -78878,7 +78878,7 @@ toughness=4 [/card] [card] name=Perilous Forays -auto={1}{S(creature|mybattlefield)}:target(*[swamp;island;mountain;forest;plains]|mylibrary) moveTo(myBattlefield) and!(tap)! +auto={1}{S(creature|mybattlefield)}:target(*[swamp;island;mountain;forest;plains]|mylibrary) moveTo(myBattlefield) and!(tap(noevent))! text={1}, Sacrifice a creature: Search your library for a land card with a basic land type and put it onto the battlefield tapped. Then shuffle your library. mana={3}{G}{G} type=Enchantment @@ -80095,7 +80095,7 @@ toughness=1 [/card] [card] name=Phytotitan -autograveyard=@movedTo(this|graveyard) from(myBattlefield):phaseaction[my upkeep once]:moveTo(myBattlefield) and!(tap)! +autograveyard=@movedTo(this|graveyard) from(myBattlefield):phaseaction[my upkeep once]:moveTo(myBattlefield) and!(tap(noevent))! text=When Phytotitan dies, return it to the battlefield tapped under its owner's control at the beginning of his or her next upkeep. mana={4}{G}{G} type=Creature @@ -82028,8 +82028,8 @@ toughness=3 [card] name=Primeval Titan abilities=trample -auto=may target(land|mylibrary) and!(tap)! moveTo(mybattlefield) -auto=@combat(attacking) source(this):may target(land|mylibrary) moveTo(mybattlefield) and!(tap)! +auto=may target(land|mylibrary) and!(tap(noevent))! moveTo(mybattlefield) +auto=@combat(attacking) source(this):may target(land|mylibrary) moveTo(mybattlefield) and!(tap(noevent))! text=Trample -- Whenever Primeval Titan enters the battlefield or attacks, you may search your library for up to two land cards, put them onto the battlefield tapped, then shuffle your library. mana={4}{G}{G} type=Creature @@ -83886,7 +83886,7 @@ toughness=1 [/card] [card] name=Quirion Trailblazer -auto=may moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=When Quirion Trailblazer enters the battlefield, 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 @@ -84890,7 +84890,7 @@ toughness=4 [/card] [card] name=Rampant Growth -auto=moveTo(myBattlefield) and!(tap)! notatarget(land[basic]|myLibrary) +auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|myLibrary) text=Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Sorcery @@ -84991,7 +84991,7 @@ type=Instant [/card] [card] name=Ranger's Path -auto=name(fetch) moveTo(myBattlefield) and!(tap)! notatarget(forest|mylibrary) +auto=name(fetch) moveTo(myBattlefield) and!(tap(noevent))! notatarget(forest|mylibrary) text=Search your library for up to two Forest cards and put them onto the battlefield tapped. Then shuffle your library. mana={3}{G} type=Sorcery @@ -89337,7 +89337,7 @@ toughness=3 [/card] [card] name=Root Maze -auto=@movedTo(artifact,land|battlefield):all(trigger) tap +auto=lord(artifact,land|battlefield) transforms((,newability[tap(noevent)])) text=Artifacts and lands enter the battlefield tapped. mana={G} type=Enchantment @@ -89898,7 +89898,7 @@ toughness=1 [card] name=Ruin in Their Wake target=land|myBattlefield -auto=if type(waste|mybattlefield)~morethan~0 then moveto(mybattlefield) and!(tap)! else moveto(myhand) +auto=if type(waste|mybattlefield)~morethan~0 then moveto(mybattlefield) and!(tap(noevent))! else moveto(myhand) text=Devoid (This card has no color.) -- Search your library for a basic land card and reveal it. You may put that card onto the battlefield tapped if you control a land named Wastes. Otherwise, put that card into your hand. Then shuffle your library. mana={1}{G} abilities=devoid @@ -91015,7 +91015,7 @@ toughness=3 [/card] [card] name=Sakura-Tribe Elder -auto={S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text=Sacrifice Sakura-Tribe Elder: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. mana={1}{G} type=Creature @@ -94132,7 +94132,7 @@ toughness=1 [/card] [card] name=Seedguide Ash -auto=@movedTo(this|graveyard) from(battlefield):target(forest|mylibrary) moveTo(myBattlefield) and!(tap)! +auto=@movedTo(this|graveyard) from(battlefield):target(forest|mylibrary) moveTo(myBattlefield) and!(tap(noevent))! text=When Seedguide Ash is put into a graveyard from the battlefield, you may search your library for up to three Forest cards and put them onto the battlefield tapped. If you do, shuffle your library. mana={4}{G} type=Creature @@ -97764,7 +97764,7 @@ toughness=7 [card] name=Silkwing Scout abilities=flying -auto={G}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={G}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text=Flying -- {G}, Sacrifice Silkwing Scout: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={2}{U} type=Creature @@ -97997,7 +97997,7 @@ toughness=4 [/card] [card] name=Silverglade Pathfinder -auto={1}{G}{T}{discard(*|myhand)}:moveTo(myBattlefield) and!(tap)! target(basic|myLibrary) +auto={1}{G}{T}{discard(*|myhand)}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|myLibrary) text={1}{G}, {T}, Discard a card: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={1}{G} type=Creature @@ -101039,7 +101039,7 @@ type=Sorcery [/card] [card] name=Solemn Simulacrum -auto=may moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) auto=@movedTo(this|graveyard) from(Battlefield):may draw:1 controller text=When Solemn Simulacrum enters the battlefield, you may search your library for a basic land card and put that card onto the battlefield tapped. If you do, shuffle your library. -- When Solemn Simulacrum dies, you may draw a card. mana={4} @@ -105403,7 +105403,7 @@ toughness=2 [card] name=Stitchwing Skaab abilities=flying -auto={1}{U}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap)! +auto={1}{U}{discard(*|myhand)}{discard(*|myhand)}:moveto(mybattlefield) and!(tap(noevent))! text=Flying -- {1}{U}, Discard two cards: Return Stitchwing Skaab from your graveyard to the battlefield tapped. mana={3}{U} type=Creature @@ -108325,7 +108325,7 @@ subtype=Equipment name=Sword of the Animist auto={2}:equip auto=teach(creature) 1/1 -auto=@combat(attacking) source(mytgt):may notatarget(land[basic]|mylibrary) moveto(mybattlefield) and!(tap)! +auto=@combat(attacking) source(mytgt):may notatarget(land[basic]|mylibrary) moveto(mybattlefield) and!(tap(noevent))! text=Equipped creature gets +1/+1. -- Whenever equipped creature attacks, you may search your library for a basic land card, put it onto the battlefield tapped, then shuffle your library. -- Equip {2} mana={2} type=Legendary Artifact @@ -108518,7 +108518,7 @@ type=Instant [card] name=Sylvan Primordial abilities=reach -auto=name(destroy) target(*[-creature]|opponentbattlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):ability$!notatarget(forest|mylibrary) moveto(mybattlefield) and!(tap)!!$ opponent],newability[destroy])) +auto=name(destroy) target(*[-creature]|opponentbattlefield) transforms((,newability[@movedTo(this|graveyard) from(battlefield):ability$!notatarget(forest|mylibrary) moveto(mybattlefield) and!(tap(noevent))!!$ opponent],newability[destroy])) text=Reach -- When Sylvan Primordial enters the battlefield, for each opponent, destroy target noncreature permanent that player controls. For each permanent destroyed this way, search your library for a Forest card and put that card onto the battlefield tapped. Then shuffle your library. mana={5}{G}{G} type=Creature @@ -110506,7 +110506,7 @@ toughness=9 [card] name=Terminal Moraine auto={T}:Add{1} -auto={2}{T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={2}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text={T}: Add {1} to your mana pool. -- {2}, {T}, Sacrifice Terminal Moraine: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -110581,13 +110581,13 @@ toughness=2 [card] name=Terrain Generator auto={T}:Add{1} -auto={2}{T}:moveTo(myBattlefield) and!(tap)! target(land[basic]|myhand) +auto={2}{T}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myhand) text={T}: Add {1} to your mana pool. -- {2}, {T}: You may put a basic land card from your hand onto the battlefield tapped. type=Land [/card] [card] name=Terramorphic Expanse -auto={T}{S}:moveTo(myBattlefield) and!(tap)! target(basic|mylibrary) +auto={T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) text={T}, Sacrifice Terramorphic Expanse: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -111077,7 +111077,7 @@ toughness=2 [card] name=Thawing Glaciers auto=tap(noevent) -auto={1}{T}:moveTo(mybattlefield) and!(tap)! target(land[basic]|mylibrary) && phaseaction[cleanup,sourceinplay] moveto(myhand) all(this) +auto={1}{T}:moveTo(mybattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) && phaseaction[cleanup,sourceinplay] moveto(myhand) all(this) text=Thawing Glaciers enters the battlefield tapped. -- {1}, {T}: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. Return Thawing Glaciers to its owner's hand at the beginning of the next cleanup step. type=Land [/card] @@ -116375,7 +116375,7 @@ toughness=2 name=Ulvenwald Hydra abilities=reach anyzone=type:land:mybattlefield/type:land:mybattlefield cdaactive -auto=may target(land|mylibrary) moveto(mybattlefield) and!(tap)! +auto=may target(land|mylibrary) moveto(mybattlefield) and!(tap(noevent))! text=Reach -- Ulvenwald Hydra's power and toughness are each equal to the number of lands you control. -- When Ulvenwald Hydra enters the battlefield, you may search your library for a land card, put it onto the battlefield tapped, then shuffle your library. mana={4}{G}{G} type=Creature @@ -117347,7 +117347,7 @@ type=Sorcery [/card] [card] name=Uphill Battle -auto=@movedTo(creature|opponentBattlefield):all(trigger) tap +auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures your opponents play enter the battlefield tapped. mana={2}{R} type=Enchantment @@ -117383,7 +117383,7 @@ type=Enchantment [card] name=Urabrask the Hidden auto=lord(creature|mybattlefield) haste -auto=@movedTo(creature|opponentBattlefield):all(trigger) tap +auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures you control have Haste. -- Creatures your opponents control enter the battlefield tapped. mana={3}{R}{R} type=Legendary Creature @@ -120103,7 +120103,7 @@ toughness=2 [/card] [card] name=Viridian Emissary -auto=@movedTo(this|graveyard) from(battlefield):may moveTo(mybattlefield) and!(tap)! target(land[basic]|mylibrary) +auto=@movedTo(this|graveyard) from(battlefield):may moveTo(mybattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text=When Viridian Emissary dies, 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={1}{G} type=Creature @@ -122678,7 +122678,7 @@ type=Enchantment [card] name=Warped Landscape auto={T}:Add{1} -auto={2}{T}{s}:moveto(mybattlefield) target(basic|mylibrary) and!(tap)! +auto={2}{T}{s}:moveto(mybattlefield) target(basic|mylibrary) and!(tap(noevent))! text={T}: Add {1} to your mana pool. -- {2}, {T}, Sacrifice Warped Landscape: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] @@ -123143,7 +123143,7 @@ subtype=Aura [/card] [card] name=Wayfarer's Bauble -auto={2}{T}{S}:moveTo(myBattlefield) and!(tap)! target(land[basic]|mylibrary) +auto={2}{T}{S}:moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|mylibrary) text={2}, {T}, Sacrifice Wayfarer's Bauble: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library. mana={1} type=Artifact @@ -126410,7 +126410,7 @@ toughness=6 name=Xathrid Necromancer Zombie type=Creature subtype=Zombie -auto=tap +auto=tap(noevent) power=2 toughness=2 color=black @@ -126548,8 +126548,8 @@ type=Land [card] name=Yavimaya Dryad abilities=forestwalk -auto=may name(my battlefield) moveTo(myBattlefield) and!(tap)! target(forest|mylibrary) -auto=may name(opponent's battlefield) moveTo(opponentBattlefield) and!(tap)! target(forest|mylibrary) +auto=may name(my battlefield) moveTo(myBattlefield) and!(tap(noevent))! target(forest|mylibrary) +auto=may name(opponent's battlefield) moveTo(opponentBattlefield) and!(tap(noevent))! target(forest|mylibrary) text=Forestwalk -- When Yavimaya Dryad enters the battlefield, you may search your library for a Forest card and put it onto the battlefield tapped under target player's control. If you do, shuffle your library. mana={1}{G}{G} type=Creature @@ -126591,7 +126591,7 @@ toughness=1 [/card] [card] name=Yavimaya Granger -auto=may moveTo(myBattlefield) and!(tap)! target(land[basic]|myLibrary) +auto=may moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) auto=upcost[{2}{G};next upkeep] sacrifice text=Echo {2}{G} (At the beginning of your upkeep, if this came under your control since the beginning of your last upkeep, sacrifice it unless you pay its echo cost.) -- When Yavimaya Granger enters the battlefield, you may search your library for a basic land card, put that card onto the battlefield tapped, then shuffle your library. mana={2}{G} @@ -127452,7 +127452,7 @@ toughness=2 [card] name=Zombie Apocalypse auto=destroy all(human) -auto=all(creature[zombie]|mygraveyard) moveTo(mybattlefield) and!(tap)! +auto=all(creature[zombie]|mygraveyard) moveTo(mybattlefield) and!(tap(noevent))! text=Return all Zombie creature cards from your graveyard to the battlefield tapped, then destroy all Humans. mana={3}{B}{B}{B} type=Sorcery @@ -127572,7 +127572,7 @@ toughness=2 name=Zombie Token type=Creature subtype=Zombie -auto=tap +auto=tap(noevent) power=2 toughness=2 color=black diff --git a/projects/mtg/include/GameObserver.h b/projects/mtg/include/GameObserver.h index 2f520043c..6d451a392 100644 --- a/projects/mtg/include/GameObserver.h +++ b/projects/mtg/include/GameObserver.h @@ -126,6 +126,8 @@ class GameObserver{ void Affinity(); bool AffinityNeedsUpdate; void addObserver(MTGAbility * observer); + void checkLegendary(MTGCardInstance * card); + map cards; bool removeObserver(ActionElement * observer); void startGame(GameType, Rules * rules); void untapPhase(); diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index cf0ea0905..9892a118d 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -897,7 +897,13 @@ void GameObserver::gameStateBasedEffects() int nbcards = z->nb_cards; //------------------------------ p->nomaxhandsize = (z->hasAbility(Constants::NOMAXHAND)); - + //legendary + for (int cl = 0; cl < nbcards; cl++) + { + MTGCardInstance * c = z->cards[cl]; + if(!c->isPhased && c->hasType(Subtypes::TYPE_LEGENDARY) && !c->has(Constants::NOLEGEND)) + checkLegendary(c); + } ///////////////////////////////////////////////// //handle end of turn effects while we're at it.// ///////////////////////////////////////////////// @@ -1021,6 +1027,43 @@ void GameObserver::gameStateBasedEffects() } } +void GameObserver::checkLegendary(MTGCardInstance * card) +{ + map::iterator it; + int destroy = 0; + + vectoroldCards; + for (it = cards.begin(); it != cards.end(); it++) + { + MTGCardInstance * comparison = (*it).first; + if (comparison != card && comparison->controller() == card->controller() && !(comparison->getName().compare(card->getName()))) + { + oldCards.push_back(comparison); + destroy = 1; + } + } + if(destroy) + { + vectorselection; + MultiAbility * multi = NEW MultiAbility(this, this->mLayers->actionLayer()->getMaxId(), card, card, NULL); + for(unsigned int i = 0;i < oldCards.size();i++) + { + AAMover *a = NEW AAMover(this, this->mLayers->actionLayer()->getMaxId(), card, oldCards[i],"ownergraveyard","Keep New"); + a->oneShot = true; + multi->Add(a); + } + multi->oneShot = 1; + MTGAbility * a1 = multi; + selection.push_back(a1); + AAMover *b = NEW AAMover(this, this->mLayers->actionLayer()->getMaxId(), card, card,"ownergraveyard","Keep Old"); + b->oneShot = true; + MTGAbility * b1 = b; + selection.push_back(b1); + MTGAbility * menuChoice = NEW MenuAbility(this, this->mLayers->actionLayer()->getMaxId(), card, card,true,selection,card->controller(),"Legendary Rule"); + menuChoice->addToGame(); + } +} + void GameObserver::enchantmentStatus() { for (int i = 0; i < 2; i++) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index befb63824..4a210d44a 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -3187,7 +3187,7 @@ int MTGLegendRule::canBeInList(MTGCardInstance * card) return 0; if (card->hasType(Subtypes::TYPE_LEGENDARY) && card->controller()->game->inPlay->hasCard(card)) { - if(card->has(Constants::NOLEGEND)) + if(card->has(Constants::NOLEGEND)||card->controller()->opponent()->inPlay()->hasName("Mirror Gallery")||card->controller()->inPlay()->hasName("Mirror Gallery")) return 0; else return 1;