diff --git a/projects/mtg/bin/Res/graphics/alphabeta.png b/projects/mtg/bin/Res/graphics/alphabeta.png index bc2c38a02..b6b302756 100644 Binary files a/projects/mtg/bin/Res/graphics/alphabeta.png and b/projects/mtg/bin/Res/graphics/alphabeta.png differ diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 76fdb9724..b8a239dbb 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -838,8 +838,8 @@ toughness=5 [card] name=Adarkar Wastes auto={T}:Add{1} -auto={T}:Add{W} && Damage:1 controller -auto={T}:Add{U} && Damage:1 controller +auto={T}:Add{W} and!( damage:1 controller )! +auto={T}:Add{U} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {W} or {U} to your mana pool. Adarkar Wastes deals 1 damage to you. type=Land [/card] @@ -3163,7 +3163,7 @@ type=Instant name=Amnesia target=player aicode=activate choice reject all(*[-land]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) transforms((,newability[moveto(ownerhand) and!( reject )! all(*[-land]|reveal)])) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(<1>*[-land]|reveal) transforms((,newability[moveto(ownerhand) and!( reject )! all(*[-land]|reveal)])) optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand and discards all nonland cards. mana={3}{U}{U}{U} type=Sorcery @@ -3663,7 +3663,7 @@ text=Look at the top five cards of your library. You may reveal a colorless card [/card] [card] name=Ancient Tomb -auto={T}:Add{2} && Damage:2 controller +auto={T}:Add{2} and!( damage:2 controller )! text={T}: Add {2} to your mana pool. Ancient Tomb deals 2 damage to you. type=Land [/card] @@ -6723,11 +6723,11 @@ type=Instant [/card] [card] name=Astrolabe -auto={1}{T}{S}:Add{W}{W} && phaseaction[upkeep once] draw:1 controller -auto={1}{T}{S}:Add{U}{U} && phaseaction[upkeep once] draw:1 controller -auto={1}{T}{S}:Add{B}{B} && phaseaction[upkeep once] draw:1 controller -auto={1}{T}{S}:Add{R}{R} && phaseaction[upkeep once] draw:1 controller -auto={1}{T}{S}:Add{G}{G} && phaseaction[upkeep once] draw:1 controller +auto={1}{T}{S}:Add{W}{W} and!( phaseaction[upkeep once] draw:1 controller )! +auto={1}{T}{S}:Add{U}{U} and!( phaseaction[upkeep once] draw:1 controller )! +auto={1}{T}{S}:Add{B}{B} and!( phaseaction[upkeep once] draw:1 controller )! +auto={1}{T}{S}:Add{R}{R} and!( phaseaction[upkeep once] draw:1 controller )! +auto={1}{T}{S}:Add{G}{G} and!( phaseaction[upkeep once] draw:1 controller )! text={1}, {T}, Sacrifice Astrolabe: Add two mana of any one color to your mana pool. Draw a card at the beginning of the next turn's upkeep. mana={3} type=Artifact @@ -9058,7 +9058,7 @@ toughness=3 [/card] [card] name=Barbarian Ring -auto={T}:Add{R} && damage:1 controller +auto={T}:Add{R} and!( damage:1 controller )! auto=aslongas(*|mygraveyard) {R}{T}{S}:damage:2 target(creature,player) >6 text={T}: Add {R} to your mana pool. Barbarian Ring deals 1 damage to you. -- Threshold - {R}, {T}, Sacrifice Barbarian Ring: Barbarian Ring deals 2 damage to target creature or player. Activate this ability only if seven or more cards are in your graveyard. type=Land @@ -9102,11 +9102,11 @@ type=Enchantment [/card] [card] name=Barbed Sextant -auto={1}{T}{S}:Add{W} && phaseaction[upkeep once] draw:1 controller -auto={1}{T}{S}:Add{U} && phaseaction[upkeep once] draw:1 controller -auto={1}{T}{S}:Add{B} && phaseaction[upkeep once] draw:1 controller -auto={1}{T}{S}:Add{R} && phaseaction[upkeep once] draw:1 controller -auto={1}{T}{S}:Add{G} && phaseaction[upkeep once] draw:1 controller +auto={1}{T}{S}:Add{W} and!( phaseaction[upkeep once] draw:1 controller )! +auto={1}{T}{S}:Add{U} and!( phaseaction[upkeep once] draw:1 controller )! +auto={1}{T}{S}:Add{B} and!( phaseaction[upkeep once] draw:1 controller )! +auto={1}{T}{S}:Add{R} and!( phaseaction[upkeep once] draw:1 controller )! +auto={1}{T}{S}:Add{G} and!( phaseaction[upkeep once] draw:1 controller )! text={1}, {T}, Sacrifice Barbed Sextant: Add one mana of any color to your mana pool. Draw a card at the beginning of the next turn's upkeep. mana={1} type=Artifact @@ -9762,8 +9762,8 @@ type=Enchantment [card] name=Battlefield Forge auto={T}:Add{1} -auto={T}:Add{R} && Damage:1 controller -auto={T}:Add{W} && Damage:1 controller +auto={T}:Add{R} and!( damage:1 controller )! +auto={T}:Add{W} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {R} or {W} to your mana pool. Battlefield Forge deals 1 damage to you. type=Land [/card] @@ -14330,8 +14330,8 @@ toughness=1 [card] name=Brainbite target=opponent -aicode=activate reject notatarget(*[-land]|targetedpersonshand) and!( draw:1 controller )! -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[draw:1 controller])) oneshot afterrevealedend revealend +aicode=activate reject notatarget(*|targetedpersonshand) and!( draw:1 controller )! +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[draw:1 controller])) oneshot afterrevealedend revealend text=Target opponent reveals his or her hand. You choose a card from it. That player discards that card. -- Draw a card. mana={2}{U}{B} type=Sorcery @@ -15394,8 +15394,8 @@ type=Sorcery [card] name=Brushland auto={T}:Add{1} -auto={T}:Add{G} && Damage:1 controller -auto={T}:Add{W} && Damage:1 controller +auto={T}:Add{G} and!( damage:1 controller )! +auto={T}:Add{W} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {G} or {W} to your mana pool. Brushland deals 1 damage to you. type=Land [/card] @@ -16071,7 +16071,7 @@ toughness=5 [/card] [card] name=Cabal Pit -auto={T}:Add{B} && damage:1 controller +auto={T}:Add{B} and!( damage:1 controller )! auto=aslongas(*|mygraveyard) {B}{T}{S}:-2/-2 target(creature) >6 text={T}: Add {B} to your mana pool. Cabal Pit deals 1 damage to you. -- Threshold - {B}, {T}, Sacrifice Cabal Pit: Target creature gets -2/-2 until end of turn. Activate this ability only if seven or more cards are in your graveyard. type=Land @@ -16322,8 +16322,8 @@ toughness=2 name=Caldera Lake auto=tap(noevent) auto={T}:Add{1} -auto={T}:Add{U} && damage:1 controller -auto={T}:Add{R} && damage:1 controller +auto={T}:Add{U} and!( damage:1 controller )! +auto={T}:Add{R} and!( damage:1 controller )! text=Caldera Lake enters the battlefield tapped. -- {T}: Add {1} to your mana pool. -- {T}: Add {U} or {R} to your mana pool. Caldera Lake deals 1 damage to you. type=Land [/card] @@ -17778,8 +17778,8 @@ toughness=5 [card] name=Caves of Koilos auto={T}:Add{1} -auto={T}:Add{W} && Damage:1 controller -auto={T}:Add{B} && Damage:1 controller +auto={T}:Add{W} and!( damage:1 controller )! +auto={T}:Add{B} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {W} or {B} to your mana pool. Caves of Koilos deals 1 damage to you. type=Land [/card] @@ -18026,7 +18026,7 @@ toughness=3 [/card] [card] name=Centaur Garden -auto={T}:Add{G} && damage:1 controller +auto={T}:Add{G} and!( damage:1 controller )! auto=aslongas(*|mygraveyard) {G}{T}{S}:3/3 target(creature) >6 text={T}: Add {G} to your mana pool. Centaur Garden deals 1 damage to you. -- Threshold - {G}, {T}, Sacrifice Centaur Garden: Target creature gets +3/+3 until end of turn. Activate this ability only if seven or more cards are in your graveyard. type=Land @@ -18147,7 +18147,7 @@ toughness=2 [/card] [card] name=Cephalid Coliseum -auto={T}:Add{U} && damage:1 controller +auto={T}:Add{U} and!( damage:1 controller )! auto=aslongas(*|mygraveyard) {U}{T}{S}:name(discard 3 cards) target(player) ability$!draw:3 _ choice target(<3>*|myhand) reject!$ targetedplayer >6 text={T}: Add {U} to your mana pool. Cephalid Coliseum deals 1 damage to you. -- Threshold - {U}, {T}, Sacrifice Cephalid Coliseum: Target player draws three cards, then discards three cards. Activate this ability only if seven or more cards are in your graveyard. type=Land @@ -19610,11 +19610,11 @@ type=Artifact [/card] [card] name=Chromatic Sphere -auto={1}{T}{S}:Add{G} && Draw:1 controller -auto={1}{T}{S}:Add{R} && Draw:1 controller -auto={1}{T}{S}:Add{U} && Draw:1 controller -auto={1}{T}{S}:Add{B} && Draw:1 controller -auto={1}{T}{S}:Add{W} && Draw:1 controller +auto={1}{T}{S}:Add{G} and!( draw:1 controller )! +auto={1}{T}{S}:Add{R} and!( draw:1 controller )! +auto={1}{T}{S}:Add{U} and!( draw:1 controller )! +auto={1}{T}{S}:Add{B} and!( draw:1 controller )! +auto={1}{T}{S}:Add{W} and!( draw:1 controller )! text={1}, {T}, Sacrifice Chromatic Sphere: Add one mana of any color to your mana pool. Draw a card. mana={1} type=Artifact @@ -19825,8 +19825,8 @@ toughness=4 [card] name=Cinder Marsh auto={T}:Add{1} -auto={T}:Add{B} && frozen -auto={T}:Add{R} && frozen +auto={T}:Add{B} and!( frozen )! +auto={T}:Add{R} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {B} or {R} to your mana pool. Cinder Marsh doesn't untap during your next untap step. type=Land [/card] @@ -20810,8 +20810,8 @@ toughness=2 [card] name=Cloudcrest Lake auto={T}:Add{1} -auto={T}:Add{W} && frozen -auto={T}:Add{U} && frozen +auto={T}:Add{W} and!( frozen )! +auto={T}:Add{U} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {W} or {U} to your mana pool. Cloudcrest Lake doesn't untap during your next untap step. type=Land [/card] @@ -21192,7 +21192,7 @@ type=Sorcery name=Coercion target=opponent aicode=activate reject notatarget(*|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a card from it. That player discards that card. mana={2}{B} type=Sorcery @@ -22664,7 +22664,8 @@ type=Instant [/card] [card] name=Corpse Traders -auto={2}{B}{S(creature|mybattlefield)}:target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend asSorcery +aicode=activate reject notatarget(*|targetedpersonshand) +auto={2}{B}{S(creature|mybattlefield)}:target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend asSorcery text={2}{B}, Sacrifice a creature: Target opponent reveals his or her hand. You choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery. mana={3}{B} type=Creature @@ -26040,7 +26041,7 @@ type=Land [/card] [card] name=Darkwater Egg -auto={2}{T}{S}:Add{U}{B} && Draw:1 +auto={2}{T}{S}:Add{U}{B} and!( draw:1 controller )! text={2}, {T}, Sacrifice Darkwater Egg: Add {U}{B} to your mana pool. Draw a card. mana={1} type=Artifact @@ -28725,7 +28726,7 @@ toughness=2 name=Despise target=opponent aicode=activate reject notatarget(*[creature;planeswalker]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[creature;planeswalker]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[creature;planeswalker]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a creature or planeswalker card from it. That player discards that card. mana={B} type=Sorcery @@ -29449,7 +29450,7 @@ toughness=4 name=Diplomacy of the Wastes target=opponent aicode=activate reject notatarget(*[-land]|targetedpersonshand) and!( if type(warrior|mybattlefield)~morethan~0 then life:-2 targetedplayer )! -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[if type(*[warrior]|mybattlefield)~morethan~0 then life:-2 opponent])) oneshot afterrevealedend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[-land]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[if type(*[warrior]|mybattlefield)~morethan~0 then life:-2 opponent])) oneshot afterrevealedend revealend text=Target opponent reveals his or her hand. You choose a nonland card from it. That player discards that card. If you control a Warrior, that player loses 2 life. mana={2}{B} type=Sorcery @@ -30100,7 +30101,7 @@ type=Sorcery name=Distress target=player aicode=activate reject notatarget(*[-land]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[-land]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. mana={B}{B} type=Sorcery @@ -32761,7 +32762,7 @@ type=Enchantment name=Duress target=opponent aicode=activate reject notatarget(*[-creature;-land]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-creature;-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[-creature;-land]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card. mana={B} type=Sorcery @@ -34687,7 +34688,7 @@ toughness=2 [/card] [card] name=Elves of Deep Shadow -auto={T}:Add{B} && damage:1 controller +auto={T}:Add{B} and!( damage:1 controller )! text={T}: Add {B} to your mana pool. Elves of Deep Shadow deals 1 damage to you. mana={G} type=Creature @@ -35615,8 +35616,8 @@ toughness=2 [card] name=Encroach target=player -aicode=activate reject notatarget(*[-land]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-basic]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +aicode=activate reject notatarget(land[-basic]|targetedpersonshand) +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>land[-basic]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonbasic land card from it. That player discards that card. mana={B} type=Sorcery @@ -36190,7 +36191,7 @@ toughness=2 name=Entomber Exarch auto=aslongas(creature|mygraveyard) choice moveTo(myhand) target(creature|mygraveyard) aicode=activate reject notatarget(*[-creature]|targetedpersonshand) -auto=choice target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(*[-creature]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=choice target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[-creature]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=When Entomber Exarch enters the battlefield, choose one - Return target creature card from your graveyard to your hand; or target opponent reveals his or her hand, you choose a noncreature card from it, then that player discards that card. mana={2}{B}{B} type=Creature @@ -44973,16 +44974,11 @@ type=Artifact [card] name=Gemstone Mine auto=counter(0/0,3,Mining) -auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{G} -auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{R} -auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{U} -auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{B} -auto=this(counter{0/0,1,Mining}>1) {T}{C(0/0,-1,Mining)}:Add{W} -auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{G} && sacrifice -auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{R} && sacrifice -auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{U} && sacrifice -auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{B} && sacrifice -auto=this(counter{0/0,1,Mining}=1) {T}{C(0/0,-1,Mining)}:Add{W} && sacrifice +auto={T}{C(0/0,-1,Mining)}:Add{G} and!( this(counter{0/0.1.Mining}<1) sacrifice oneshot )! +auto={T}{C(0/0,-1,Mining)}:Add{R} and!( this(counter{0/0.1.Mining}<1) sacrifice oneshot )! +auto={T}{C(0/0,-1,Mining)}:Add{U} and!( this(counter{0/0.1.Mining}<1) sacrifice oneshot )! +auto={T}{C(0/0,-1,Mining)}:Add{B} and!( this(counter{0/0.1.Mining}<1) sacrifice oneshot )! +auto={T}{C(0/0,-1,Mining)}:Add{W} and!( this(counter{0/0.1.Mining}<1) sacrifice oneshot )! text=Gemstone Mine enters the battlefield with three mining counters on it. -- {T}, Remove a mining counter from Gemstone Mine: Add one mana of any color to your mana pool. If there are no mining counters on Gemstone Mine, sacrifice it. type=Land [/card] @@ -49007,11 +49003,11 @@ toughness=3 name=Grand Coliseum auto=tap(noevent) auto={T}:Add{1} -auto={T}:Add{B} && damage:1 controller -auto={T}:Add{G} && damage:1 controller -auto={T}:Add{R} && damage:1 controller -auto={T}:Add{U} && damage:1 controller -auto={T}:Add{W} && damage:1 controller +auto={T}:Add{B} and!( damage:1 controller )! +auto={T}:Add{G} and!( damage:1 controller )! +auto={T}:Add{R} and!( damage:1 controller )! +auto={T}:Add{U} and!( damage:1 controller )! +auto={T}:Add{W} and!( damage:1 controller )! text=Grand Coliseum enters the battlefield tapped. -- {T}: Add {1} to your mana pool. -- {T}: Add one mana of any color to your mana pool. Grand Coliseum deals 1 damage to you. type=Land [/card] @@ -50601,8 +50597,8 @@ type=Instant [card] name=Grove of the Burnwillows auto={T}:Add{1} -auto={T}:Add{R} && life:1 opponent -auto={T}:Add{G} && life:1 opponent +auto={T}:Add{R} and!( life:1 opponent )! +auto={T}:Add{G} and!( life:1 opponent )! text={T}: Add {1} to your mana pool. -- {T}: Add {R} or {G} to your mana pool. Each opponent gains 1 life. type=Land [/card] @@ -50675,6 +50671,7 @@ subtype=Aura [card] name=Gruesome Discovery target=player +aicode=activate reject notatarget(<2>*|targetedpersonshand) auto=ifnot morbid then ability$!name(discard 2 cards) target(<2>*|myhand) reject!$ targetedplayer auto=if morbid then reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(<2>*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player discards two cards. -- Morbid - If a creature died this turn, instead that player reveals his or her hand, you choose two cards from it, then that player discards those cards. @@ -52202,7 +52199,8 @@ type=Sorcery [card] name=Harsh Scrutiny target=opponent -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(creature|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +aicode=activate reject notatarget(creature|targetedpersonshand) +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>creature|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend auto=scry:1 scrycore delayed dontshow donothing scrycoreend scryend text=Target opponent reveals his or her hand. You choose a creature card from it. That player discards that card. Scry 1. mana={B} @@ -52631,7 +52629,8 @@ toughness=1 [card] name=He Who Hungers abilities=flying -auto={1}{S(creature[spirit]|mybattlefield)}:target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend asSorcery +aicode=activate reject notatarget(*|targetedpersonshand) +auto={1}{S(creature[spirit]|mybattlefield)}:target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend asSorcery auto=@movedTo(this|mygraveyard) from(myBattlefield):may moveTo(myhand) target(spirit[manacost<=4]|mygraveyard) text=Flying -- {1}, Sacrifice a Spirit: Target opponent reveals his or her hand. You choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery. -- Soulshift 4 (When this dies, you may return target Spirit card with converted mana cost 4 or less from your graveyard to your hand.) mana={4}{B} @@ -54013,8 +54012,7 @@ type=Instant name=Hickory Woodlot auto=tap(noevent) auto=counter(0/0,2,Depletion) -auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{G}{G} -auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{G}{G} && sacrifice +auto={T}{C(0/0,-1,Depletion)}:Add{G}{G} and!( this(counter{0/0.1.Depletion}<1) sacrifice oneshot )! text=Hickory Woodlot enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Hickory Woodlot: Add {G}{G} to your mana pool. If there are no depletion counters on Hickory Woodlot, sacrifice it. type=Land [/card] @@ -58039,7 +58037,7 @@ type=Sorcery name=Inquisition of Kozilek target=player aicode=activate reject notatarget(*[-land;manacost<=3]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land;manacost<=3]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[-land;manacost<=3]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonland card from it with converted mana cost 3 or less. That player discards that card. mana={B} type=Sorcery @@ -61354,8 +61352,8 @@ type=Land [card] name=Karplusan Forest auto={T}:Add{1} -auto={T}:Add{R} && Damage:1 controller -auto={T}:Add{G} && Damage:1 controller +auto={T}:Add{R} and!( damage:1 controller )! +auto={T}:Add{G} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {R} or {G} to your mana pool. Karplusan Forest deals 1 damage to you. type=Land [/card] @@ -65112,8 +65110,8 @@ toughness=1 [card] name=Lantern-Lit Graveyard auto={T}:Add{1} -auto={T}:Add{B} && frozen -auto={T}:Add{R} && frozen +auto={T}:Add{B} and!( frozen )! +auto={T}:Add{R} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {B} or {R} to your mana pool. Lantern-Lit Graveyard doesn't untap during your next untap step. type=Land [/card] @@ -67158,11 +67156,11 @@ toughness=1 [/card] [card] name=Lion's Eye Diamond -auto={S}:Add{W}{W}{W} && reject all(*|myhand) -auto={S}:Add{U}{U}{U} && reject all(*|myhand) -auto={S}:Add{B}{B}{B} && reject all(*|myhand) -auto={S}:Add{R}{R}{R} && reject all(*|myhand) -auto={S}:Add{G}{G}{G} && reject all(*|myhand) +auto={S}:Add{W}{W}{W} and!( reject all(*|myhand) )! +auto={S}:Add{U}{U}{U} and!( reject all(*|myhand) )! +auto={S}:Add{B}{B}{B} and!( reject all(*|myhand) )! +auto={S}:Add{R}{R}{R} and!( reject all(*|myhand) )! +auto={S}:Add{G}{G}{G} and!( reject all(*|myhand) )! text=Sacrifice Lion's Eye Diamond, Discard your hand: Add three mana of any one color to your mana pool. Activate this ability only any time you could cast an instant. mana={0} type=Artifact @@ -67493,8 +67491,8 @@ toughness=1 [card] name=Llanowar Wastes auto={T}:Add{1} -auto={T}:Add{B} && Damage:1 controller -auto={T}:Add{G} && Damage:1 controller +auto={T}:Add{B} and!( damage:1 controller )! +auto={T}:Add{G} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {B} or {G} to your mana pool. Llanowar Wastes deals 1 damage to you. type=Land [/card] @@ -70526,9 +70524,10 @@ toughness=4 [/card] [card] name=Mardu Charm +aicode=activate reject notatarget(*[-creature;-land]|targetedpersonshand) auto=choice name(4 Damage) damage:4 target(creature) auto=choice name(2 Warrior tokens) token(Warrior,Creature Warrior,1/1,white) and!( transforms((,newability[first strike ueot])) )!*2 -auto=choice name(discard opponent) target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-creature;-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=choice name(discard opponent) target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Choose one: -- Mardu Charm deals 4 damage to target creature. -- Put two 1/1 white Warrior creature tokens onto the battlefield. They gain first strike until end of turn. -- Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card. mana={R}{W}{B} type=Instant @@ -73432,7 +73431,8 @@ type=Sorcery [/card] [card] name=Mind Slash -auto={B}{S(creature|mybattlefield)}:target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend asSorcery +aicode=activate notatarget(*|targetedpersonshand) reject +auto={B}{S(creature|mybattlefield)}:target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend asSorcery text={B}, Sacrifice a creature: Target opponent reveals his or her hand. You choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery. mana={1}{B}{B} type=Enchantment @@ -74904,8 +74904,8 @@ toughness=3 [card] name=Mogg Hollows auto={T}:Add{1} -auto={T}:Add{R} && frozen -auto={T}:Add{G} && frozen +auto={T}:Add{R} and!( frozen )! +auto={T}:Add{G} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {R} or {G} to your mana pool. Mogg Hollows doesn't untap during your next untap step. type=Land [/card] @@ -76167,7 +76167,7 @@ toughness=1 [/card] [card] name=Mossfire Egg -auto={2}{T}{S}:Add{R}{G} && Draw:1 +auto={2}{T}{S}:Add{R}{G} and!( draw:1 controller )! text={2}, {T}, Sacrifice Mossfire Egg: Add {R}{G} to your mana pool. Draw a card. mana={1} type=Artifact @@ -76744,10 +76744,9 @@ toughness=4 [/card] [card] name=Murmuring Bosk -auto=tap(noevent) -auto=aslongas(treefolk|myhand) untap -auto={T}:Add{W} && damage:1 controller -auto={T}:Add{B} && damage:1 controller +auto=if type(treefolk|myhand)~lessthan~1 then tap(noevent) +auto={T}:Add{W} and!( damage:1 controller )! +auto={T}:Add{B} and!( damage:1 controller )! text=({T}: Add {G} to your mana pool.) -- As Murmuring Bosk enters the battlefield, you may reveal a Treefolk card from your hand. If you don't, Murmuring Bosk enters the battlefield tapped. -- {T}: Add {W} or {B} to your mana pool. Murmuring Bosk deals 1 damage to you. type=Land subtype=Forest @@ -79257,7 +79256,7 @@ subtype=Equipment name=Nightmare Void target=player aicode=activate reject notatarget(*|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend dredge=dredge(2) text=Target player reveals his or her hand. You choose a card from it. That player discards that card. -- Dredge 2 (If you would draw a card, instead you may put exactly two cards from the top of your library into your graveyard. If you do, return this card from your graveyard to your hand. Otherwise, draw a card.) mana={3}{B} @@ -80111,7 +80110,7 @@ type=Land [/card] [card] name=Nomad Stadium -auto={T}:Add{W} && damage:1 controller +auto={T}:Add{W} and!( damage:1 controller )! auto=aslongas(*|mygraveyard) {W}{T}{S}:life:4 >6 text={T}: Add {W} to your mana pool. Nomad Stadium deals 1 damage to you. -- Threshold - {W}, {T}, Sacrifice Nomad Stadium: You gain 4 life. Activate this ability only if seven or more cards are in your graveyard. type=Land @@ -82920,7 +82919,7 @@ toughness=2 name=Ostracize target=opponent aicode=activate reject notatarget(creature|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(creature|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>creature|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target opponent reveals his or her hand. You choose a creature card from it. That player discards that card. mana={B} type=Sorcery @@ -84491,8 +84490,7 @@ toughness=1 name=Peat Bog auto=tap(noevent) auto=counter(0/0,2,Depletion) -auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{B}{B} -auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{B}{B} && sacrifice +auto={T}{C(0/0,-1,Depletion)}:Add{B}{B} and!( this(counter{0/0.1.Depletion}<1) sacrifice oneshot )! text=Peat Bog enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Peat Bog: Add {B}{B} to your mana pool. If there are no depletion counters on Peat Bog, sacrifice it. type=Land [/card] @@ -86303,16 +86301,16 @@ toughness=1 name=Pine Barrens auto=tap(noevent) auto={T}:Add{1} -auto={T}:Add{B} && damage:1 controller -auto={T}:Add{G} && damage:1 controller +auto={T}:Add{B} and!( damage:1 controller )! +auto={T}:Add{G} and!( damage:1 controller )! text=Pine Barrens enters the battlefield tapped. -- {T}: Add {1} to your mana pool. -- {T}: Add {B} or {G} to your mana pool. Pine Barrens deals 1 damage to you. type=Land [/card] [card] name=Pinecrest Ridge auto={T}:Add{1} -auto={T}:Add{R} && frozen -auto={T}:Add{G} && frozen +auto={T}:Add{R} and!( frozen )! +auto={T}:Add{G} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {R} or {G} to your mana pool. Pinecrest Ridge doesn't untap during your next untap step. type=Land [/card] @@ -88359,7 +88357,7 @@ toughness=4 [/card] [card] name=Pristine Talisman -auto={T}:add{1} && life:1 +auto={T}:add{1} and!( life:1 )! text={T}: Add {1} to your mana pool.You gain 1 life. mana={3} type=Artifact @@ -88875,7 +88873,7 @@ subtype=Aura name=Psychic Spear target=player aicode=activate reject notatarget(*[spirit;arcane]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[spirit;arcane]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[spirit;arcane]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a Spirit or Arcane card from it. That player discards that card. mana={B} type=Sorcery @@ -93180,8 +93178,7 @@ type=Sorcery name=Remote Farm auto=tap(noevent) auto=counter(0/0,2,Depletion) -auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{W}{W} -auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{W}{W} && sacrifice +auto={T}{C(0/0,-1,Depletion)}:Add{W}{W} and!( this(counter{0/0.1.Depletion}<1) sacrifice oneshot )! text=Remote Farm enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Remote Farm: Add {W}{W} to your mana pool. If there are no depletion counters on Remote Farm, sacrifice it. type=Land [/card] @@ -96149,8 +96146,8 @@ toughness=2 [card] name=Rootwater Depths auto={T}:Add{1} -auto={T}:Add{U} && frozen -auto={T}:Add{B} && frozen +auto={T}:Add{U} and!( frozen )! +auto={T}:Add{B} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {U} or {B} to your mana pool. Rootwater Depths doesn't untap during your next untap step. type=Land [/card] @@ -96187,8 +96184,8 @@ toughness=1 [card] name=Rootwater Thief auto={U}:flying -auto=@combatdamagefoeof(player) from(this):pay({2}) moveto(exile) and!(shuffle)! notatarget(*|opponentlibrary) -auto=@combatdamageof(player) from(this):pay({2}) moveto(exile) and!(shuffle)! notatarget(*|mylibrary) +aicode=activate target(*|opponentlibrary) moveto(exile) +auto=@combatdamagefoeof(player) from(this):pay({2}) name(search card) Reveal:type:*:opponentlibrary revealzone(opponentlibrary) optionone name(choose card) target(<1>*|reveal) transforms((,newability[all(other *|reveal) moveto(ownerlibrary) and!(shuffle)!],newability[moveto(exile)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text={U}: Rootwater Thief gains flying until end of turn. -- Whenever Rootwater Thief deals combat damage to a player, you may pay {2}. If you do, search that player's library for a card and exile it, then the player shuffles his or her library. mana={1}{U} type=Creature @@ -96563,7 +96560,9 @@ toughness=1 [/card] [card] name=Ruin in Their Wake -auto=if type(Wastes|mybattlefield)~morethan~0 then moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) else moveto(myhand) notatarget(land[basic]|mylibrary) +aicode=activate transforms((,newability[if type(Wastes|mybattlefield)~morethan~0 then moveto(mybattlefield) and!(tap(noevent))! notatarget(land[basic]|mylibrary) else moveto(myhand) notatarget(land[basic]|mylibrary)])) ueot +auto=if type(Wastes|mybattlefield)~morethan~0 then name(search card) reveal:plibrarycount optionone name(choose card) target(<1>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 +auto=if type(Wastes|mybattlefield)~lessthan~1 then 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=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 @@ -96857,8 +96856,9 @@ subtype=Aura [/card] [card] name=Rune-Scarred Demon -abilities=flying -auto=moveTo(myhand) target(*|mylibrary) +abilities=flying,hiddenface +aicode=activate moveTo(myhand) target(*|mylibrary) +auto=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(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend text=Flying -- When Rune-Scarred Demon enters the battlefield, search your library for a card, put it into your hand, then shuffle your library. mana={5}{B}{B} type=Creature @@ -97467,8 +97467,9 @@ toughness=2 [card] name=Sadistic Sacrament target=player -auto=ifnot paid(alternative) then moveto(exile) target(*|targetedpersonslibrary) -auto=if paid(alternative) then moveto(exile) target(*|targetedpersonslibrary) +aicode=activate transforms((,newability[if paid(alternative) then moveto(exile) target(*|targetedpersonslibrary)],newability[ifnot paid(alternative) then moveto(exile) target(*|targetedpersonslibrary)])) ueot +auto=if paid(alternative) then name(search card) Reveal:type:*:targetedpersonslibrary revealzone(targetedpersonslibrary) optionone name(choose card) target(*|reveal) transforms((,newability[all(other *|reveal) moveto(ownerlibrary) and!(shuffle)!],newability[moveto(exile)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend +auto=ifnot paid(alternative) then name(search card) Reveal:type:*:targetedpersonslibrary revealzone(targetedpersonslibrary) optionone name(choose card) target(*|reveal) transforms((,newability[all(other *|reveal) moveto(ownerlibrary) and!(shuffle)!],newability[moveto(exile)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend other={7}{B}{B}{B} name(Kicker) text=Kicker {7} (You may pay an additional {7} as you cast this spell.) -- Search target player's library for up to three cards, exile them, then that player shuffles his or her library. If Sadistic Sacrament was kicked, instead search that player's library for up to fifteen cards, exile them, then that player shuffles his or her library. mana={B}{B}{B} @@ -97529,7 +97530,8 @@ toughness=2 [/card] [card] name=Safewright Quest -auto=moveTo(myHand) notatarget(forest,plains|myLibrary) +aicode=activate target(*[forest;plains]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[forest;plains]|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 Forest or Plains card, reveal it, and put it into your hand. Then shuffle your library. mana={GW} type=Sorcery @@ -97740,7 +97742,8 @@ toughness=3 [/card] [card] name=Sakura-Tribe Elder -auto={S}:moveTo(myBattlefield) and!(tap(noevent))! target(basic|mylibrary) +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(land[basic]|myLibrary) +auto={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=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 @@ -97782,8 +97785,8 @@ toughness=3 name=Salt Flats auto=tap(noevent) auto={T}:Add{1} -auto={T}:Add{W} && damage:1 controller -auto={T}:Add{B} && damage:1 controller +auto={T}:Add{W} and!( damage:1 controller )! +auto={T}:Add{B} and!( damage:1 controller )! text=Salt Flats enters the battlefield tapped. -- {T}: Add {1} to your mana pool. -- {T}: Add {W} or {B} to your mana pool. Salt Flats deals 1 damage to you. type=Land [/card] @@ -98054,14 +98057,16 @@ toughness=3 [card] name=Sanctum of Ugin auto={T}:add{1} -auto=@movedto(*[colorless;manacost>=7]|mystack):may name(Sac and search for Colorless Creature) transforms((,newability[sacrifice],newability[moveto(myhand) notatarget(creature[colorless]|mylibrary)])) forever +aicode=activate moveto(myhand) target(creature[colorless]|mylibrary) +auto=@movedto(*[colorless;manacost>=7]|mystack):may pay({S}) name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>creature[colorless]|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}: Add {1} to your mana pool. -- Whenever you cast a colorless spell with converted mana cost 7 or greater, you may sacrifice Sanctum of Ugin. If you do, search your library for a colorless creature card, reveal it, put it into your hand, then shuffle your library. type=Land [/card] [card] name=Sanctum Plowbeast abilities=defender -autohand={2}{cycle}:name(plainscycling or islandcycling) moveTo(myhand) target(plains,island|mylibrary) +aicode=activate target(*[plains;island]|mylibrary) moveto(myhand) +autohand={2}{cycle}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>*[plains;island]|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=Defender -- Plainscycling {2}, islandcycling {2} ({2}, Discard this card: Search your library for a Plains or Island card, reveal it, and put it into your hand. Then shuffle your library.) mana={4}{W}{U} type=Artifact Creature @@ -98235,8 +98240,7 @@ type=Artifact name=Sandstone Needle auto=tap(noevent) auto=counter(0/0,2,Depletion) -auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{R}{R} -auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{R}{R} && sacrifice +auto={T}{C(0/0,-1,Depletion)}:Add{R}{R} and!( this(counter{0/0.1.Depletion}<1) sacrifice oneshot )! text=Sandstone Needle enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Sandstone Needle: Add {R}{R} to your mana pool. If there are no depletion counters on Sandstone Needle, sacrifice it. type=Land [/card] @@ -98510,8 +98514,7 @@ toughness=2 name=Saprazzan Skerry auto=tap(noevent) auto=counter(0/0,2,Depletion) -auto=this(counter{0/0,1,Depletion}>1) {T}{C(0/0,-1,Depletion)}:Add{U}{U} -auto=this(counter{0/0,1,Depletion}=1) {T}{C(0/0,-1,Depletion)}:Add{U}{U} && sacrifice +auto={T}{C(0/0,-1,Depletion)}:Add{U}{U} and!( this(counter{0/0.1.Depletion}<1) sacrifice oneshot )! text=Saprazzan Skerry enters the battlefield tapped with two depletion counters on it. -- {T}, Remove a depletion counter from Saprazzan Skerry: Add {U}{U} to your mana pool. If there are no depletion counters on Saprazzan Skerry, sacrifice it. type=Land [/card] @@ -98568,9 +98571,10 @@ subtype=Sarkhan [card] name=Sarkhan Unbroken auto=counter(0/0,9,Loyalty) +aicode=activate moveto(mybattlefield) notatarget(creature[dragon]|mylibrary) auto={C(0/0,1,Loyalty)}:name(+1: Draw card) draw:1 controller && transforms((,newability[activatechooseacolor add{chosencolor} activatechooseend])) forever asSorcery auto={C(0/0,-2,Loyalty)}:name(-2: 4/4 dragon token) token(Dragon,creature dragon,4/4,flying,red) controller asSorcery -auto={C(0/0,-8,Loyalty)}:name(-8: Search for any number of dragons) moveto(mybattlefield) notatarget(creature[dragon]|mylibrary) asSorcery +auto={C(0/0,-8,Loyalty)}:name(-8: Search for any number of dragons) reveal:plibrarycount optionone name(choose card) target(creature[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(ownerbattlefield))! afterrevealedend revealend asSorcery text=+1: Draw a card, then add one mana of any color to your mana pool. -- -2: Put a 4/4 red Dragon creature token with flying onto the battlefield. -- -8: Search your library for any number of Dragon creature cards and put them onto the battlefield. Then shuffle your library. -- Starting Loyalty (4) mana={2}{G}{U}{R} type=Planeswalker @@ -98609,7 +98613,8 @@ type=Instant [/card] [card] name=Sarkhan's Triumph -auto=moveto(myhand) notatarget(creature[dragon]|mylibrary) +aicode=activate target(creature[dragon]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>creature[dragon]|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 Dragon creature card, reveal it, put it into your hand, then shuffle your library. mana={2}{R} type=Instant @@ -98983,8 +98988,8 @@ toughness=1 name=Scabland auto=tap(noevent) auto={T}:Add{1} -auto={T}:Add{R} && damage:1 controller -auto={T}:Add{W} && damage:1 controller +auto={T}:Add{R} and!( damage:1 controller )! +auto={T}:Add{W} and!( damage:1 controller )! text=Scabland enters the battlefield tapped. -- {T}: Add {1} to your mana pool. -- {T}: Add {R} or {W} to your mana pool. Scabland deals 1 damage to you. type=Land [/card] @@ -99018,7 +99023,8 @@ toughness=1 [/card] [card] name=Scalding Tarn -auto={L}{T}{S}:moveTo(myBattlefield) target(island,mountain|mylibrary) +aicode=activate moveTo(myBattlefield) target(*[island;mountain]|myLibrary) +auto={L}{T}{S}:name(search card) reveal:plibrarycount optionone name(choose card) target(*[island;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 Scalding Tarn: Search your library for an Island or Mountain card and put it onto the battlefield. Then shuffle your library. type=Land [/card] @@ -99978,7 +99984,8 @@ type=Sorcery [card] name=Screaming Seahawk abilities=flying -auto=may moveTo(myhand) target(screaming seahawk|mylibrary) +aicode=activate target(screaming seahawk|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>screaming seahawk|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=Flying -- When Screaming Seahawk enters the battlefield, you may search your library for a card named Screaming Seahawk, reveal it, and put it into your hand. If you do, shuffle your library. mana={4}{U} type=Creature @@ -100548,7 +100555,8 @@ toughness=3 [/card] [card] name=Seahunter -auto={3}{T}:moveTo(myBattlefield) target(merfolk[-sorcery;-instant]|mylibrary) +aicode=activate moveTo(myBattlefield) target(merfolk[-sorcery;-instant]|myLibrary) +auto={3}{T}:name(search card) reveal:plibrarycount optionone name(choose card) target(merfolk[-sorcery;-instant]|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={3}, {T}: Search your library for a Merfolk permanent card and put that card onto the battlefield. Then shuffle your library. mana={2}{U}{U} type=Creature @@ -100626,7 +100634,8 @@ type=Enchantment [/card] [card] name=Search for Tomorrow -auto=moveto(mybattlefield) notatarget(basic|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=Search your library for a basic land card and put it onto the battlefield. Then shuffle your library. -- Suspend 2 - {G} (Rather than cast this card from your hand, you may pay {G} and exile it with two time counters on it. At the beginning of your upkeep, remove a time counter. When the last is removed, cast it without paying its mana cost.) mana={2}{G} suspend(2)={g} @@ -100875,7 +100884,8 @@ subtype=Aura name=Secret Salvage target=*[-land]|mygraveyard auto=moveto(exile) -auto=target(*[share!name!]|mylibrary) moveto(myhand) +aicode=activate target(*[share!name!]|mylibrary) moveto(myhand) +auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(*[share!name!]|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=Exile target nonland card from your graveyard. Search your library for any number of cards with the same name as that card, reveal them, and put them into your hand. Then shuffle your library. mana={3}{B}{B} type=Sorcery @@ -101053,7 +101063,8 @@ toughness=1 [/card] [card] name=Seedguide Ash -auto=@movedTo(this|graveyard) from(battlefield):target(forest|mylibrary) moveTo(myBattlefield) and!(tap(noevent))! +aicode=activate moveTo(myBattlefield) and!(tap(noevent))! target(forest|myLibrary) +auto=@movedTo(this|graveyard) from(battlefield):name(search card) reveal:plibrarycount optionone name(choose card) target(forest|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=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 @@ -102558,7 +102569,7 @@ toughness=1 [/card] [card] name=Shadowblood Egg -auto={2}{T}{S}:Add{B}{R} && draw:1 +auto={2}{T}{S}:Add{B}{R} and!( draw:1 controller )! text={2}, {T}, Sacrifice Shadowblood Egg: Add {B}{R} to your mana pool. Draw a card. mana={1} type=Artifact @@ -103667,8 +103678,8 @@ toughness=1 [card] name=Shivan Reef auto={T}:Add{1} -auto={T}:Add{U} && Damage:1 controller -auto={T}:Add{R} && Damage:1 controller +auto={T}:Add{U} and!( damage:1 controller )! +auto={T}:Add{R} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {U} or {R} to your mana pool. Shivan Reef deals 1 damage to you. type=Land [/card] @@ -106405,7 +106416,7 @@ toughness=4 [/card] [card] name=Skycloud Egg -auto={2}{T}{S}:Add{W}{U} && draw:1 +auto={2}{T}{S}:Add{W}{U} and!( draw:1 controller )! text={2}, {T}, Sacrifice Skycloud Egg: Add {W}{U} to your mana pool. Draw a card. mana={1} type=Artifact @@ -106754,8 +106765,8 @@ toughness=1 name=Skyshroud Forest auto=tap(noevent) auto={T}:Add{1} -auto={T}:Add{U} && damage:1 controller -auto={T}:Add{G} && damage:1 controller +auto={T}:Add{U} and!( damage:1 controller )! +auto={T}:Add{G} and!( damage:1 controller )! text=Skyshroud Forest enters the battlefield tapped. -- {T}: Add {1} to your mana pool. -- {T}: Add {U} or {G} to your mana pool. Skyshroud Forest deals 1 damage to you. type=Land [/card] @@ -114592,8 +114603,8 @@ type=Instant [card] name=Sulfurous Springs auto={T}:Add{1} -auto={T}:Add{B} && Damage:1 controller -auto={T}:Add{R} && Damage:1 controller +auto={T}:Add{B} and!( damage:1 controller )! +auto={T}:Add{R} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {B} or {R} to your mana pool. Sulfurous Springs deals 1 damage to you. type=Land [/card] @@ -114937,7 +114948,7 @@ toughness=2 [/card] [card] name=Sungrass Egg -auto={2}{T}{S}:Add{G}{W} && draw:1 +auto={2}{T}{S}:Add{G}{W} and!( draw:1 controller )! text={2}, {T}, Sacrifice Sungrass Egg: Add {G}{W} to your mana pool. Draw a card. mana={1} type=Artifact @@ -116785,8 +116796,8 @@ toughness=2 [card] name=Talisman of Dominance auto={T}:Add{1} -auto={T}:Add{U} && damage:1 controller -auto={T}:Add{B} && damage:1 controller +auto={T}:Add{U} and!( damage:1 controller )! +auto={T}:Add{B} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {U} or {B} to your mana pool. Talisman of Dominance deals 1 damage to you. mana={2} type=Artifact @@ -116794,8 +116805,8 @@ type=Artifact [card] name=Talisman of Impulse auto={T}:Add{1} -auto={T}:Add{R} && damage:1 controller -auto={T}:Add{G} && damage:1 controller +auto={T}:Add{R} and!( damage:1 controller )! +auto={T}:Add{G} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {R} or {G} to your mana pool. Talisman of Impulse deals 1 damage to you. mana={2} type=Artifact @@ -116803,8 +116814,8 @@ type=Artifact [card] name=Talisman of Indulgence auto={T}:Add{1} -auto={T}:Add{B} && damage:1 controller -auto={T}:Add{R} && damage:1 controller +auto={T}:Add{B} and!( damage:1 controller )! +auto={T}:Add{R} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {B} or {R} to your mana pool. Talisman of Indulgence deals 1 damage to you. mana={2} type=Artifact @@ -116812,8 +116823,8 @@ type=Artifact [card] name=Talisman of Progress auto={T}:Add{1} -auto={T}:Add{W} && damage:1 controller -auto={T}:Add{U} && damage:1 controller +auto={T}:Add{W} and!( damage:1 controller )! +auto={T}:Add{U} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {W} or {U} to your mana pool. Talisman of Progress deals 1 damage to you. mana={2} type=Artifact @@ -116821,8 +116832,8 @@ type=Artifact [card] name=Talisman of Unity auto={T}:Add{1} -auto={T}:Add{G} && damage:1 controller -auto={T}:Add{W} && damage:1 controller +auto={T}:Add{G} and!( damage:1 controller )! +auto={T}:Add{W} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {G} or {W} to your mana pool. Talisman of Unity deals 1 damage to you. mana={2} type=Artifact @@ -117205,11 +117216,11 @@ toughness=1+* [card] name=Tarnished Citadel auto={T}:Add{1} -auto={T}:Add{B} && Damage:3 controller -auto={T}:Add{G} && Damage:3 controller -auto={T}:Add{R} && Damage:3 controller -auto={T}:Add{U} && Damage:3 controller -auto={T}:Add{W} && Damage:3 controller +auto={T}:Add{B} and!( damage:3 controller )! +auto={T}:Add{G} and!( damage:3 controller )! +auto={T}:Add{R} and!( damage:3 controller )! +auto={T}:Add{U} and!( damage:3 controller )! +auto={T}:Add{W} and!( damage:3 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add one mana of any color to your mana pool. Tarnished Citadel deals 3 damage to you. type=Land [/card] @@ -118771,8 +118782,8 @@ toughness=3 [card] name=Thalakos Lowlands auto={T}:Add{1} -auto={T}:Add{W} && frozen -auto={T}:Add{U} && frozen +auto={T}:Add{W} and!( frozen )! +auto={T}:Add{U} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {W} or {U} to your mana pool. Thalakos Lowlands doesn't untap during your next untap step. type=Land [/card] @@ -119338,6 +119349,7 @@ toughness=4 [/card] [card] name=Think Tank +aicode=activate may moveto(ownergraveyard) all(*[zpos=1]|mylibrary) auto=@each my upkeep:name(Look) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put in graveyard) target(<1>*|reveal) moveto(mygraveyard) optiontwoend revealend text=At the beginning of your upkeep, look at the top card of your library. You may put that card into your graveyard. mana={2}{U} @@ -119803,6 +119815,7 @@ type=Enchantment [/card] [card] name=Thoughtpicker Witch +aicode=activate transforms((,newability[choice all(*[zpos=2]|targetedpersonslibrary) moveto(exile)],newability[choice all(*[zpos=1]|targetedpersonslibrary) moveto(exile)])) ueot auto={1}{s(creature|mybattlefield}:target(opponent) reveal:2 optionone name(Put in exile) target(*|reveal) moveto(ownerexile) optiononeend optiontwo name(put back) all(*|reveal) moveto(ownerlibrary) optiontwoend revealend text={1}, Sacrifice a creature: Look at the top two cards of target opponent's library, then exile one of them. mana={B} @@ -119834,7 +119847,7 @@ type=Sorcery name=Thoughtseize target=player aicode=activate reject notatarget(*[-land]|targetedpersonshand) and!( life:-2 controller )! -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*|reveal) moveto(ownerhand)])) oneshot )! optiononeend optiontwo name(look) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[life:-2 controller])) oneshot afterrevealedend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(<1>*[-land]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*|reveal) moveto(ownerhand)])) oneshot )! optiononeend optiontwo name(look) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[life:-2 controller])) oneshot afterrevealedend revealend text=Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life. mana={B} type=Sorcery @@ -120303,7 +120316,8 @@ subtype=Aura [/card] [card] name=Thrull Surgeon -auto={1}{B}{S}:reject target(*|opponenthand) asSorcery +aicode=activate reject notatarget(*|targetedpersonshand) +auto={1}{B}{S}:target(player) name(target player) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend asSorcery text={1}{B}, Sacrifice Thrull Surgeon: Look at target player's hand and choose a card from it. That player discards that card. Activate this ability only any time you could cast a sorcery. mana={1}{B} type=Creature @@ -121342,7 +121356,8 @@ toughness=3 name=Titan's Strength target=creature auto=3/1 -auto=reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend +aicode=activate may bottomoflibrary all(*[zpos=1]|mylibrary) +auto=name(scry cards) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend text=Target creature gets +3/+1 until end of turn. Scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) mana={R} type=Instant @@ -121535,8 +121550,8 @@ type=Land [/card] [card] name=Tomb of Urami -auto={T}:add{B} && aslongas(ogre|myBattlefield) damage:1 controller <1 -auto={2}{B}{B}{T}:moveTo(mygraveyard) all(land|myBattlefield) && token(Urami,Legendary Creature Demon Spirit, 5/5,flying,black) +auto={T}:add{B} and!( if type(ogre|myBattlefield)~lessthan~1 then damage:1 controller )! +auto={2}{B}{B}{T}{saclands}:token(Urami,Legendary Creature Demon Spirit, 5/5,flying,black) text={T}: Add {B} to your mana pool. Tomb of Urami deals 1 damage to you if you don't control an Ogre. -- {2}{B}{B}, {T}, Sacrifice all lands you control: Put a legendary 5/5 black Demon Spirit creature token with flying named Urami onto the battlefield. type=Legendary Land [/card] @@ -121571,6 +121586,7 @@ type=Sorcery [/card] [card] name=Tomorrow, Azami's Familiar +aicode=activate transforms((,newability[choice all(*[zpos=3]|mylibrary) moveto(myhand) and!(bottomoflibrary all(*[zpos<=2]|mylibrary))!],newability[choice all(*[zpos=2]|mylibrary) moveto(myhand) and!(bottomoflibrary all(*[zpos<=2]|mylibrary))!],newability[choice all(*[zpos=1]|mylibrary) moveto(myhand) and!(bottomoflibrary all(*[zpos<=2]|mylibrary))!])) ueot auto=replacedraw reveal:3 optionone name(Get a card) target(*|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend text=If you would draw a card, look at the top three cards of your library instead. Put one of those cards into your hand and the rest on the bottom of your library in any order. mana={5}{U} @@ -122166,7 +122182,8 @@ toughness=4 [card] name=Tower Geist abilities=flying -auto=reveal:2 optionone name(Get a card) target(<1>*|reveal) moveto(myhand) optiononeend optiontwo all(*|reveal) moveto(mygraveyard) optiontwoend revealend +aicode=activate transforms((,newability[choice all(*[zpos=2]|mylibrary) moveto(myhand) and!(deplete:1)!],newability[choice all(*[zpos=1]|mylibrary) moveto(myhand) and!(deplete:1)!])) ueot +auto=name(look) reveal:2 optionone name(Get a card) target(<1>*|reveal) moveto(myhand) optiononeend optiontwo all(*|reveal) moveto(mygraveyard) optiontwoend revealend text=Flying -- When Tower Geist enters the battlefield, look at the top two cards of your library. Put one of them into your hand and the other into your graveyard. mana={3}{U} type=Creature @@ -122577,8 +122594,8 @@ type=Land [card] name=Tranquil Garden auto={T}:Add{1} -auto={T}:Add{G} && frozen -auto={T}:Add{W} && frozen +auto={T}:Add{G} and!( frozen )! +auto={T}:Add{W} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {G} or {W} to your mana pool. Tranquil Garden doesn't untap during your next untap step. type=Land [/card] @@ -122641,7 +122658,7 @@ toughness=3 name=Transgress the Mind target=player aicode=activate moveto(exile) notatarget(*[manacost>=3]|targetedpersonshand) -auto=Reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) revealtype(*|targetedpersonshand) optionone name(choose discard) notatarget(*[manacost>=3]|reveal) moveto(ownerexile) optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) ueot optiontwoend revealend +auto=Reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) revealtype(*|targetedpersonshand) optionone name(choose discard) notatarget(<1>*[manacost>=3]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(exile)])) ueot optiononeend optiontwo name(Put Back) target(*|reveal) transforms((,newability[all(*|reveal) moveto(ownerhand)])) ueot optiontwoend revealend text=Devoid (This card has no color.) -- Target player reveals his or her hand. You choose a card from it with converted mana cost 3 or greater and exile that card. mana={1}{B} abilities=devoid @@ -122711,7 +122728,7 @@ type=Instant name=Trapfinder's Trick target=player aicode=activate choice reject all(*[trap]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[trap]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*[trap]|reveal) moveto(ownerhand) and!(reject)!])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(<1>*[trap]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*[trap]|reveal) moveto(ownerhand) and!(reject)!])) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand and discards all Trap cards. mana={1}{U} type=Sorcery @@ -123362,6 +123379,7 @@ type=Instant [/card] [card] name=Trickery Charm +aicode=name(look) activate name(look) donothing auto=target(creature) flying ueot auto=choice name(choose a type)activatechooseatype target(creature) becomes(removecreaturesubtypes) ueot && becomes(chosentype) ueot activatechooseend auto=choice reveal:4 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo target(<4>*|reveal) moveto(mylibrary) optiontwoend revealend @@ -124877,6 +124895,7 @@ subtype=Aura [/card] [card] name=Uncovered Clues +aicode=activate target(<4>*[zpos<=4]|mylibrary) name(revealed card) bottomoflibrary name(revealed card) and!(if cantargetcard(*[instant;sorcery]|*) then moveto(myhand))! auto=reveal:4 optionone name(Get Cards) target(*[instant;sorcery]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend text=Look at the top four cards of your library. You may reveal up to two instant and/or sorcery cards from among them and put the revealed cards into your hand. Put the rest on the bottom of your library in any order. mana={2}{U} @@ -125000,8 +125019,8 @@ toughness=2 [card] name=Underground River auto={T}:Add{1} -auto={T}:Add{U} && Damage:1 controller -auto={T}:Add{B} && Damage:1 controller +auto={T}:Add{U} and!( damage:1 controller )! +auto={T}:Add{B} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {U} or {B} to your mana pool. Underground River deals 1 damage to you. type=Land [/card] @@ -125104,11 +125123,11 @@ type=Enchantment [/card] [card] name=Undiscovered Paradise -auto={T}:Add{G} && phaseaction[myupkeep sourceinplay] moveTo(ownerhand) -auto={T}:Add{W} && phaseaction[myupkeep sourceinplay] moveTo(ownerhand) -auto={T}:Add{U} && phaseaction[myupkeep sourceinplay] moveTo(ownerhand) -auto={T}:Add{B} && phaseaction[myupkeep sourceinplay] moveTo(ownerhand) -auto={T}:Add{R} && phaseaction[myupkeep sourceinplay] moveTo(ownerhand) +auto={T}:Add{G} and!( phaseaction[my untap sourceinplay] moveTo(ownerhand) )! +auto={T}:Add{W} and!( phaseaction[my untap sourceinplay] moveTo(ownerhand) )! +auto={T}:Add{U} and!( phaseaction[my untap sourceinplay] moveTo(ownerhand) )! +auto={T}:Add{B} and!( phaseaction[my untap sourceinplay] moveTo(ownerhand) )! +auto={T}:Add{R} and!( phaseaction[my untap sourceinplay] moveTo(ownerhand) )! text={T}: Add one mana of any color to your mana pool. During your next untap step, as you untap your permanents, return Undiscovered Paradise to its owner's hand. type=Land [/card] @@ -125377,7 +125396,7 @@ type=Instant name=Unmask target=player aicode=activate reject notatarget(*[-land]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[-land]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend other={E(other *[black]|myhand)} name(Exile a Black Card from Hand) text=You may exile a black card from your hand rather than pay Unmask's mana cost. -- Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. mana={3}{B} @@ -126587,7 +126606,8 @@ type=Instant name=Vanquish the Foul target=creature[power>=4] auto=destroy -auto=reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend +aicode=activate may bottomoflibrary all(*[zpos=1]|mylibrary) +auto=name(scry cards) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend text=Destroy target creature with power 4 or greater. Scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) mana={5}{W} type=Sorcery @@ -126772,8 +126792,8 @@ toughness=0 [card] name=Vec Townships auto={T}:Add{1} -auto={T}:Add{G} && frozen -auto={T}:Add{W} && frozen +auto={T}:Add{G} and!( frozen )! +auto={T}:Add{W} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {G} or {W} to your mana pool. Vec Townships doesn't untap during your next untap step. type=Land [/card] @@ -127067,7 +127087,7 @@ type=Land name=Venarian Glimmer target=player aicode=activate reject notatarget(*[-land;manacost<=castx]|targetedpersonshand) -auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land;manacost<=castx]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) notatarget(<1>*[-land;manacost<=castx]|reveal) transforms((,newability[moveto(ownerhand) all(other *|reveal)],newability[moveto(ownerhand) and!(reject)!])) ueot optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Target player reveals his or her hand. You choose a nonland card with converted mana cost X or less from it. That player discards that card. mana={X}{U} type=Instant @@ -128719,6 +128739,7 @@ toughness=3 [/card] [card] name=Viscera Seer +aicode=activate may bottomoflibrary all(*[zpos=1]|mylibrary) auto={S(creature|myBattlefield)}:reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend text=Sacrifice a creature: Scry 1. (To scry 1, look at the top card of your library, then you may put that card on the bottom of your library.) mana={B} @@ -129818,7 +129839,8 @@ type=Artifact name=Voyage's End target=creature auto=moveto(ownerhand) -auto=reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend +aicode=activate may bottomoflibrary all(*[zpos=1]|mylibrary) +auto=name(scry cards) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend text=Return target creature to its owner's hand. Scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) mana={1}{U} type=Instant @@ -130105,7 +130127,8 @@ type=Sorcery [card] name=Walker of Secret Ways autohand={1}{U}{N}:ninjutsu -auto=@combatdamagefoeof(player) from(this):name(look at opponents hand) target(*|opponenthand) donothing ueot +aicode=name(look) activate name(look) target(*|opponenthand) donothing +auto=@combatdamagefoeof(player) from(this):reveal:ohandcount revealzone(opponenthand) optionone name(look) target(<1>*|reveal) moveto(ownerhand) and!(all(*|reveal) moveto(ownerhand))! optiononeend revealend auto={1}{U}:moveTo(myhand) target(ninja|myBattlefield) myTurnOnly text=Ninjutsu {1}{U} ({1}{U}, Return an unblocked attacker you control to hand: Put this card onto the battlefield from your hand tapped and attacking.) -- Whenever Walker of Secret Ways deals combat damage to a player, look at that player's hand. -- {1}{U}: Return target Ninja you control to its owner's hand. Activate this ability only during your turn. mana={2}{U} @@ -130784,7 +130807,8 @@ type=Artifact [/card] [card] name=Wanderguard Sentry -auto=name(look at opponents hand) target(*|opponenthand) donothing ueot +aicode=name(look) activate name(look) target(*|opponenthand) donothing +auto=target(opponent) name(target opponent) reveal:ohandcount revealzone(opponenthand) optionone name(look) target(<1>*|reveal) moveto(ownerhand) and!(all(*|reveal) moveto(ownerhand))! optiononeend revealend text=When Wanderguard Sentry enters the battlefield, look at target opponent's hand. mana={4}{U} type=Creature @@ -130823,6 +130847,7 @@ toughness=3 [/card] [card] name=Wandering Graybeard +aicode=activate target(*[zpos=1]|mylibrary) moveto(mylibrary) and!(moveto(mylibrary) and!(if cantargetcard(creature[share!types!]|*) then life:4 controller)!)! auto=@each my upkeep:name(Kinship) reveal:1 optionone if type(creature[share!types!]|reveal)~morethan~0 then life:4 controller optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend text=Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Wandering Graybeard, you may reveal it. If you do, you gain 4 life. mana={3}{W}{W} @@ -131639,6 +131664,7 @@ toughness=4 [/card] [card] name=Waterspout Weavers +aicode=activate target(*[zpos=1]|mylibrary) moveto(mylibrary) and!(moveto(mylibrary) and!(if cantargetcard(creature[share!types!]|*) then lord(creature|mybattlefield) flying ueot)!)! auto=@each my upkeep:name(Kinship) reveal:1 optionone if type(creature[share!types!]|reveal)~morethan~0 then lord(creature|mybattlefield) flying ueot optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend text=Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Waterspout Weavers, you may reveal it. If you do, each creature you control gains flying until end of turn. mana={3}{U}{U} @@ -131650,8 +131676,8 @@ toughness=3 [card] name=Waterveil Cavern auto={T}:Add{1} -auto={T}:Add{U} && frozen -auto={T}:Add{B} && frozen +auto={T}:Add{U} and!( frozen )! +auto={T}:Add{B} and!( frozen )! text={T}: Add {1} to your mana pool. -- {T}: Add {U} or {B} to your mana pool. Waterveil Cavern doesn't untap during your next untap step. type=Land [/card] @@ -133790,6 +133816,7 @@ toughness=2 [/card] [card] name=Winnower Patrol +aicode=activate target(*[zpos=1]|mylibrary) moveto(mylibrary) and!(moveto(mylibrary) and!(if cantargetcard(creature[share!types!]|*) then all(this) counter(1/1) )!)! auto=@each my upkeep:name(Kinship) reveal:1 optionone if type(creature[share!types!]|reveal)~morethan~0 then all(this) counter(1/1,1) optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend text=Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Winnower Patrol, you may reveal it. If you do, put a +1/+1 counter on Winnower Patrol. mana={2}{G} @@ -134011,7 +134038,7 @@ type=Sorcery [card] name=Witch Engine abilities=swampwalk -auto={T}:Add{B}{B}{B}{B} && moveTo(opponentBattlefield) +auto={T}:Add{B}{B}{B}{B} and!( moveTo(opponentBattlefield) )! text=Swampwalk -- {T}: Add {B}{B}{B}{B} to your mana pool. Target opponent gains control of Witch Engine. (Activate this ability only any time you could cast an instant.) mana={5}{B} type=Creature @@ -134393,6 +134420,7 @@ subtype=Aura [/card] [card] name=Wolf-Skull Shaman +aicode=activate target(*[zpos=1]|mylibrary) moveto(mylibrary) and!(moveto(mylibrary) and!(if cantargetcard(creature[share!types!]|*) then token(Wolf,Creature Wolf,2/2,green))!)! auto=@each my upkeep:name(Kinship) reveal:1 optionone if type(creature[share!types!]|reveal)~morethan~0 then token(Wolf,Creature Wolf,2/2,green) optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend text=Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Wolf-Skull Shaman, you may reveal it. If you do, put a 2/2 green Wolf creature token onto the battlefield. mana={1}{G} @@ -134815,7 +134843,8 @@ toughness=2 [/card] [card] name=Worldly Counsel -auto=name(Look at My top cards) reveal:pbasiclandtypes optionone name(Get a Card) target(*|reveal) moveto(myhand) optiononeend optiontwo target(<10>*|reveal) bottomoflibrary optiontwoend revealend +aicode=activate target(*[zpos<=pbasiclandtypes]|mylibrary) moveto(myhand) +auto=name(Look) reveal:pbasiclandtypes optionone name(Get a Card) target(*|reveal) moveto(myhand) optiononeend optiontwo target(<10>*|reveal) bottomoflibrary optiontwoend revealend text=Domain - Look at the top X cards of your library, where X is the number of basic land types among lands you control. Put one of those cards into your hand and the rest on the bottom of your library in any order. mana={1}{U} type=Instant @@ -135198,7 +135227,8 @@ toughness=1 [card] name=Wu Scout abilities=horsemanship -auto=name(look at opponents hand) target(*|opponenthand) donothing ueot +aicode=name(look) activate name(look) target(*|opponenthand) donothing +auto=target(opponent) name(target opponent) reveal:ohandcount revealzone(opponenthand) optionone name(look) target(<1>*|reveal) moveto(ownerhand) and!(all(*|reveal) moveto(ownerhand))! optiononeend revealend text=Horsemanship (This creature can't be blocked except by creatures with horsemanship.) -- When Wu Scout enters the battlefield, look at target opponent's hand. mana={1}{U} type=Creature @@ -135208,6 +135238,7 @@ toughness=1 [/card] [card] name=Wu Spy +aicode=activate transforms((,newability[choice all(*[zpos=2]|targetedpersonslibrary) moveto(ownergraveyard)],newability[choice all(*[zpos=1]|targetedpersonslibrary) moveto(ownergraveyard)])) ueot auto=target(player) reveal:2 optionone name(Put in graveyard) target(*|reveal) moveto(ownergraveyard) optiononeend optiontwo name(put back) all(*|reveal) moveto(ownerlibrary) optiontwoend revealend text=When Wu Spy enters the battlefield, look at the top two cards of target player's library. Put one of them into his or her graveyard. mana={1}{U} @@ -135517,8 +135548,8 @@ toughness=2 [card] name=Yavimaya Coast auto={T}:Add{1} -auto={T}:Add{G} && Damage:1 controller -auto={T}:Add{U} && Damage:1 controller +auto={T}:Add{G} and!( damage:1 controller )! +auto={T}:Add{U} and!( damage:1 controller )! text={T}: Add {1} to your mana pool. -- {T}: Add {G} or {U} to your mana pool. Yavimaya Coast deals 1 damage to you. type=Land [/card] diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 9c400ceae..089cd63b9 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -1332,6 +1332,28 @@ public: } }; +class TrCardPhasesOut: public Trigger +{ +public: + TrCardPhasesOut(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, bool once = false) : + Trigger(observer, id, source, once, tc) + { + } + + int triggerOnEventImpl(WEvent * event) + { + WEventCardPhasesOut * e = dynamic_cast (event); + if (!e) return 0; + if (!tc->canTarget(e->card)) return 0; + return 1; + } + + TrCardPhasesOut * clone() const + { + return NEW TrCardPhasesOut(*this); + } +}; + class TrCardPhasesIn: public Trigger { public: @@ -2867,6 +2889,11 @@ public: { if(!nonstatic) return; + if(game) + {//bypass + if(game->OpenedDisplay && (game->players[0]->game->reveal->cards.size()||game->players[1]->game->reveal->cards.size())) + return; + } if(source->isToken && !source->isInPlay(game) && cda) { this->forceDestroy = 1; diff --git a/projects/mtg/include/CardGui.h b/projects/mtg/include/CardGui.h index 4ef10700b..cea1cf5e5 100644 --- a/projects/mtg/include/CardGui.h +++ b/projects/mtg/include/CardGui.h @@ -33,7 +33,7 @@ protected: /* ** Tries to render the Big version of a card picture, backups to text version in case of failure */ - static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false); + static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false, bool gdv = false); static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal); static void AlternateRender(MTGCard * card, const Pos& pos); @@ -55,8 +55,8 @@ public: virtual void Render(); virtual void Update(float dt); - void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false); - static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false); + void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool gdv = false); + static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool gdv = false); static JQuadPtr AlternateThumbQuad(MTGCard * card); virtual ostream& toString(ostream&) const; diff --git a/projects/mtg/include/DeckView.h b/projects/mtg/include/DeckView.h index 7feec1226..6cf0b9bf9 100644 --- a/projects/mtg/include/DeckView.h +++ b/projects/mtg/include/DeckView.h @@ -207,7 +207,7 @@ protected: * * \see mCards */ - void renderCard(int index, int alpha, bool asThumbnail = false); + void renderCard(int index, int alpha, bool asThumbnail = false, bool griddeckview = false); /*! \brief Returns the index in mCards of the card that is nearest to the given point * diff --git a/projects/mtg/include/ExtraCost.h b/projects/mtg/include/ExtraCost.h index b3920a6b6..e13541083 100644 --- a/projects/mtg/include/ExtraCost.h +++ b/projects/mtg/include/ExtraCost.h @@ -183,6 +183,15 @@ public: virtual int doPay(); }; +//Sacrifice all Lands cost +class SacLandsCost : public ExtraCost +{ +public: + SacLandsCost(TargetChooser *_tc = NULL); + virtual int doPay(); + virtual SacLandsCost * clone() const; +}; + //unattach cost class UnattachCost : public ExtraCost { diff --git a/projects/mtg/include/MTGAbility.h b/projects/mtg/include/MTGAbility.h index a95643059..c00d527df 100644 --- a/projects/mtg/include/MTGAbility.h +++ b/projects/mtg/include/MTGAbility.h @@ -538,6 +538,7 @@ protected: Player * controller; public: + MTGAbility * andAbility; string menutext; ManaCost * output; int tap; diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 8971cfb79..8dad3de0b 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -305,7 +305,13 @@ struct WEventCardControllerChange : public WEventCardUpdate { virtual Targetable * getTarget(int target); }; -//event when card with phases in +//event when card phases out +struct WEventCardPhasesOut : public WEventCardUpdate { + WEventCardPhasesOut(MTGCardInstance * card); + virtual Targetable * getTarget(int target); +}; + +//event when card phases in struct WEventCardPhasesIn : public WEventCardUpdate { WEventCardPhasesIn(MTGCardInstance * card); virtual Targetable * getTarget(int target); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index ac80a2d2a..c2b6e2e72 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1708,6 +1708,9 @@ int AAPhaseOut::resolve() if(_target->view) _target->view->alpha = 50; _target->initAttackersDefensers(); + //add event phases out here + WEvent * e = NEW WEventCardPhasesOut(_target); + game->receiveEvent(e); return 1; } return 0; diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index c5e815d99..1348d4afb 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -111,17 +111,17 @@ void CardGui::Update(float dt) PlayGuiObject::Update(dt); } -void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder) +void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder, bool gdv) { DrawCard(card, inPosition, inMode, thumb, noborder); } -void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder) +void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder, bool gdv) { switch (inMode) { case DrawMode::kNormal: - RenderBig(inCard, inPosition, thumb, noborder); + RenderBig(inCard, inPosition, thumb, noborder, gdv); break; case DrawMode::kText: AlternateRender(inCard, inPosition); @@ -596,19 +596,19 @@ void CardGui::AlternateRender(MTGCard * card, const Pos& pos) items.clear(); if (q.get() && q->mTex) { - //test - //draw black border ingame only if(thiscard && thiscard->getObserver()) { zpos = thiscard->zpos; - renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5)); - renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240)); } q->SetHotSpot(static_cast (q->mTex->mWidth / 2), static_cast (q->mTex->mHeight / 2)); float scale = pos.actZ * 250 / q->mHeight; q->SetColor(ARGB((int)pos.actA,255,255,255)); + //new border + renderer->FillRoundRect(pos.actX - (scale * q->mWidth / 2)-5.8f,pos.actY - (scale * q->mHeight / 2)-5.8f, (scale * q->mWidth)-0.02f, (scale * q->mHeight)-0.02f, 5.8f,ARGB(255,5,5,5)); + renderer->DrawRoundRect(pos.actX - (scale * q->mWidth / 2)-5.8f,pos.actY - (scale * q->mHeight / 2)-5.8f, (scale * q->mWidth)-0.02f, (scale * q->mHeight)-0.02f, 5.8f,ARGB(50,240,240,240)); + //end renderer->RenderQuad(q.get(), x, pos.actY, pos.actT, scale, scale); } @@ -1170,7 +1170,7 @@ void CardGui::TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad) } //Renders a big card on screen. Defaults to the "alternate" rendering if no image is found -void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder) +void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder, bool gdv) { JRenderer * renderer = JRenderer::GetInstance(); //GameObserver * game = GameObserver::GetInstance(); @@ -1217,7 +1217,7 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder float scale = pos.actZ * 250.f / quad->mHeight; //init setname string cardsetname = setlist[card->setId].c_str(); - if(!noborder) + /*if(!noborder) { if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") {//Draw white border @@ -1238,7 +1238,19 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-11.5f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f + 6.5f,pos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240)); } } + }*///disabled this for universal border across game, deck editor, etc... + //universal border + if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") + {//white border + renderer->FillRoundRect(pos.actX - (scale * quad->mWidth / 2)-6.f,pos.actY - (scale * quad->mHeight / 2)-5.8f, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 5.8f,ARGB(255,248,248,255)); + renderer->DrawRoundRect(pos.actX - (scale * quad->mWidth / 2)-6.f,pos.actY - (scale * quad->mHeight / 2)-5.8f, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 5.8f,ARGB(150,20,20,20)); } + else + {//black border + renderer->FillRoundRect(pos.actX - (scale * quad->mWidth / 2)-6.f,pos.actY - (scale * quad->mHeight / 2)-5.8f, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 5.8f,ARGB(255,5,5,5)); + renderer->DrawRoundRect(pos.actX - (scale * quad->mWidth / 2)-6.f,pos.actY - (scale * quad->mHeight / 2)-5.8f, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 5.8f,ARGB(50,240,240,240)); + } + //end new border //draw inner border if(cardsetname == "LEA"||cardsetname == "LEB") { @@ -1250,9 +1262,10 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder renderer->RenderQuad(alphabeta.get(), x, pos.actY+0.2f, pos.actT, myscale, myscale); } } - float modxscale = (cardsetname =="UNH")?0.02f:0.0f; - float modyscale = (cardsetname =="UNH")?0.015f:0.0f; - renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale+modxscale, scale+modyscale); + float modxscale = (cardsetname =="UNH")?0.015f:0.0f; + float modyscale = (cardsetname =="UNH")?0.010f:0.0f; + float gdvadd = gdv?0.008f:0.0f;//scale add grid deck view + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, (scale-0.005f)+modxscale+gdvadd, (scale-0.005f)+modyscale+gdvadd); RenderCountersBig(card, pos); return; diff --git a/projects/mtg/src/DeckView.cpp b/projects/mtg/src/DeckView.cpp index 43a06dd30..a184d1d93 100644 --- a/projects/mtg/src/DeckView.cpp +++ b/projects/mtg/src/DeckView.cpp @@ -93,7 +93,7 @@ void DeckView::reloadIndexes() } } -void DeckView::renderCard(int index, int alpha, bool asThumbnail) +void DeckView::renderCard(int index, int alpha, bool asThumbnail, bool griddeckview) { WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); @@ -146,7 +146,7 @@ void DeckView::renderCard(int index, int alpha, bool asThumbnail) else {//NORMAL VIEW WITH IMAGES int mode = !options[Options::DISABLECARDS].number ? DrawMode::kNormal : DrawMode::kText; - //border for editor && others??? + /*//border for editor && others??? string cardsetname = setlist[cardPosition.card->setId].c_str(); if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM") { @@ -157,9 +157,9 @@ void DeckView::renderCard(int index, int alpha, bool asThumbnail) { JRenderer::GetInstance()->FillRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(255,10,10,10)); JRenderer::GetInstance()->DrawRoundRect((cardPosition.x - cardPosition.scale * 100.0f)-5.f,(cardPosition.y - cardPosition.scale * 142.5f)-5.f,cardPosition.scale * 200.0f,cardPosition.scale * 285.0f,5.f,ARGB(50,240,240,240)); - } + }*///disabled this for universal border Pos pos = Pos(cardPosition.x, cardPosition.y, cardPosition.scale * 285 / 250, 0.0, 255); - CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true); + CardGui::DrawCard(cardPosition.card, pos, mode, asThumbnail, true, griddeckview); } int quadAlpha = alpha; if (!deck()->count(cardPosition.card)) quadAlpha /= 2; diff --git a/projects/mtg/src/ExtraCost.cpp b/projects/mtg/src/ExtraCost.cpp index fc21e686a..589d69358 100644 --- a/projects/mtg/src/ExtraCost.cpp +++ b/projects/mtg/src/ExtraCost.cpp @@ -62,7 +62,7 @@ void ExtraCost::Render() WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); mFont->SetColor(ARGB(255,255,255,255)); - mFont->DrawString(mCostRenderString, 20, 20, JGETEXT_LEFT); + mFont->DrawString(mCostRenderString, 40, 20, JGETEXT_LEFT); } } @@ -95,7 +95,7 @@ ExtraManaCost * ExtraManaCost::clone() const } ExtraManaCost::ExtraManaCost(ManaCost * costToPay) - : ExtraCost("",NULL, costToPay) + : ExtraCost("\nCost:",NULL, costToPay) { } @@ -240,7 +240,7 @@ EnergyCost * EnergyCost::clone() const } EnergyCost::EnergyCost(int enc) : -ExtraCost("Energy Cost"),enc(enc) +ExtraCost("Energy"),enc(enc) { } @@ -465,7 +465,7 @@ DiscardCost * DiscardCost::clone() const } DiscardCost::DiscardCost(TargetChooser *_tc) : -ExtraCost("Choose card to Discard", _tc) +ExtraCost("Discard", _tc) { } @@ -529,7 +529,7 @@ ToLibraryCost * ToLibraryCost::clone() const } ToLibraryCost::ToLibraryCost(TargetChooser *_tc) - : ExtraCost("Put a card on top of Library", _tc) + : ExtraCost("Move to Library", _tc) { } @@ -558,7 +558,7 @@ ToGraveCost * ToGraveCost::clone() const } ToGraveCost::ToGraveCost(TargetChooser *_tc) - : ExtraCost("Move a card to Graveyard", _tc) + : ExtraCost("Move to Graveyard", _tc) { } @@ -641,6 +641,43 @@ int MillExileCost::doPay() } return 0; } + +//sac all lands cost +SacLandsCost * SacLandsCost::clone() const +{ + SacLandsCost * ec = NEW SacLandsCost(*this); + if (tc) + ec->tc = tc->clone(); + return ec; +} + +SacLandsCost::SacLandsCost(TargetChooser *_tc) + : ExtraCost("Sacrifice All Lands", _tc) +{ +} + +int SacLandsCost::doPay() +{ + MTGGameZone * zone = source->controller()->game->inPlay; + for (int j = zone->nb_cards - 1; j >= 0; j--) + { + MTGCardInstance * card = zone->cards[j]; + if(card->isLand() && !card->has(Constants::CANTBESACRIFIED)) + { + if (card) + { + MTGCardInstance * beforeCard = card; + source->storedCard = card->createSnapShot(); + card->controller()->game->putInGraveyard(card); + WEvent * e = NEW WEventCardSacrifice(beforeCard,card); + GameObserver * game = card->owner->getObserver(); + game->receiveEvent(e); + } + } + } + return 1; +} + //unattach cost UnattachCost * UnattachCost::clone() const @@ -734,7 +771,7 @@ UnTapCost * UnTapCost::clone() const } UnTapCost::UnTapCost() : -ExtraCost("UnTap") +ExtraCost("Untap") { } @@ -919,7 +956,7 @@ BounceTargetCost * BounceTargetCost::clone() const } BounceTargetCost::BounceTargetCost(TargetChooser *_tc) - : ExtraCost("Return Target to Hand", _tc) + : ExtraCost("Move to Hand", _tc) { } @@ -948,7 +985,7 @@ Ninja * Ninja::clone() const } Ninja::Ninja(TargetChooser *_tc) : -ExtraCost("Select unblocked attacker", _tc) +ExtraCost("Choose Unblocked Card", _tc) { } @@ -999,7 +1036,7 @@ Convoke * Convoke::clone() const } Convoke::Convoke(TargetChooser *_tc) : - ExtraCost("Select Cards To Tap", _tc) + ExtraCost("Choose Cards To Tap", _tc) { } @@ -1121,7 +1158,7 @@ Delve * Delve::clone() const } Delve::Delve(TargetChooser *_tc) : - ExtraCost("Select Cards To Exile", _tc) + ExtraCost("Choose Cards To Exile", _tc) { } @@ -1189,7 +1226,7 @@ Improvise * Improvise::clone() const } Improvise::Improvise(TargetChooser *_tc) : - ExtraCost("Select Artifacts To Tap", _tc) + ExtraCost("Choose Artifacts to Tap", _tc) { } @@ -1258,7 +1295,7 @@ Offering * Offering::clone() const } Offering::Offering(TargetChooser *_tc,bool emerge) : -ExtraCost("Select creature to offer", _tc), emerge(emerge) +ExtraCost("Choose Creature to Offer", _tc), emerge(emerge) { } diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 8b8728474..080906bfe 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -691,7 +691,10 @@ void GameObserver::gameStateBasedEffects() players[d]->DeadLifeState(); } //////////////////////////////////// - + //i think this must be limited to reveal display only but we can make an auto close like on android after a targetchooser... + //lets see so far... adding this fixes some cards that rely on card count in hand or library or any zone the needs constant card count... + if (OpenedDisplay && (players[0]->game->reveal->cards.size() || players[1]->game->reveal->cards.size())) + return; if (mLayers->stackLayer()->count(0, NOT_RESOLVED) != 0) return; if (mLayers->actionLayer()->menuObject) @@ -852,6 +855,9 @@ void GameObserver::gameStateBasedEffects() if(card->view) card->view->alpha = 50; card->initAttackersDefensers(); + //add event phases out here + WEvent * evphaseout = NEW WEventCardPhasesOut(card); + receiveEvent(evphaseout); } else if((card->has(Constants::PHASING) || card->isPhased)&& mCurrentGamePhase == MTG_PHASE_UNTAP && currentPlayer == card->controller() && card->phasedTurn != turn) { @@ -1040,13 +1046,13 @@ void GameObserver::gameStateBasedEffects() //Auto skip Phases int skipLevel = (currentPlayer->playMode == Player::MODE_TEST_SUITE || mLoading) ? Constants::ASKIP_NONE : options[Options::ASPHASES].number; - + bool noattackers = currentPlayer->noPossibleAttackers(); if (skipLevel == Constants::ASKIP_SAFE || skipLevel == Constants::ASKIP_FULL) { if ((opponent()->isAI() && !(isInterrupting)) && ((mCurrentGamePhase == MTG_PHASE_UNTAP) || (mCurrentGamePhase == MTG_PHASE_DRAW) || (mCurrentGamePhase == MTG_PHASE_COMBATBEGIN) - || ((mCurrentGamePhase == MTG_PHASE_COMBATATTACKERS) && (currentPlayer->noPossibleAttackers())) - || mCurrentGamePhase == MTG_PHASE_COMBATEND || mCurrentGamePhase == MTG_PHASE_ENDOFTURN + || ((mCurrentGamePhase == MTG_PHASE_COMBATATTACKERS) && (noattackers)) + || (mCurrentGamePhase == MTG_PHASE_COMBATEND) || (mCurrentGamePhase == MTG_PHASE_ENDOFTURN) || ((mCurrentGamePhase == MTG_PHASE_CLEANUP) && (currentPlayer->game->hand->nb_cards < 8)))) userRequestNextGamePhase(); } diff --git a/projects/mtg/src/GridDeckView.cpp b/projects/mtg/src/GridDeckView.cpp index 032230ac9..d93035e15 100644 --- a/projects/mtg/src/GridDeckView.cpp +++ b/projects/mtg/src/GridDeckView.cpp @@ -132,9 +132,9 @@ void GridDeckView::Render() #endif } #if !defined (PSP) - renderCard(i, 255, false);//for psp, use lowres images if you can. + renderCard(i, 255, false, true);//for psp, use lowres images if you can. #else - renderCard(i, 255, true); + renderCard(i, 255, true, true); #endif } else diff --git a/projects/mtg/src/GuiPhaseBar.cpp b/projects/mtg/src/GuiPhaseBar.cpp index e7a34f3bb..f9c5b6118 100644 --- a/projects/mtg/src/GuiPhaseBar.cpp +++ b/projects/mtg/src/GuiPhaseBar.cpp @@ -146,7 +146,8 @@ void GuiPhaseBar::Render() //running this string through translate returns gibberish even though we defined the variables in the lang.txt //the conversion from phase bar phases to mtg phases is x%kPhases + 1 //todo: just to this when the displayedPhaseId updates - string phaseNameToTranslate = observer->phaseRing->phaseName(displayedPhaseId%kPhases + 1); + //string phaseNameToTranslate = observer->phaseRing->phaseName(displayedPhaseId%kPhases + 1); + string phaseNameToTranslate = observer->phaseRing->phaseName(observer->phaseRing->getCurrentPhase()->id); phaseNameToTranslate = _(phaseNameToTranslate); sprintf(buf, _("(%s%s) %s").c_str(), currentP.c_str(), interrupt.c_str(),phaseNameToTranslate.c_str()); #if !defined (PSP) diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 55bccd9ae..b3453eb74 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1044,6 +1044,10 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell if (TargetChooser *tc = parseSimpleTC(s,"phasedin", card)) return NEW TrCardPhasesIn(observer, id, card, tc,once); + //Card Phases Out + if (TargetChooser *tc = parseSimpleTC(s,"phasedout", card)) + return NEW TrCardPhasesOut(observer, id, card, tc,once); + //CombatTrigger //Card card attacked and is blocked found = s.find("combat("); @@ -3828,6 +3832,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG a->oneShot = 1; if(newName.size()) ((AManaProducer*)a)->menutext = newName; + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((AManaProducer*)a)->andAbility = parseMagicLine(stored, id, spell, card); + } return a; } @@ -6469,6 +6479,7 @@ AManaProducer::AManaProducer(GameObserver* observer, int id, MTGCardInstance * c Producing = producing; menutext = ""; DoesntEmpty = doesntEmpty; + andAbility = NULL; } int AManaProducer::isReactingToClick(MTGCardInstance * _card, ManaCost * mana) @@ -6508,6 +6519,20 @@ int AManaProducer::resolve() player->getManaPool()->add(output, source); if(DoesntEmpty) player->doesntEmpty->add(output); + if(andAbility) + { + MTGAbility * andAbilityClone = andAbility->clone(); + andAbilityClone->target = source; + if(andAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } return 1; } diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index aa9d7e557..550177ff7 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -875,22 +875,13 @@ int MTGCardInstance::canproduceMana(int color) { int count = 0; - //start - if(hasSubtype("forest") && color == 1) - count++; - if(hasSubtype("island") && color == 2) - count++; - if(hasSubtype("mountain") && color == 3) - count++; - if(hasSubtype("swamp") && color == 4) - count++; - if(hasSubtype("plains") && color == 5) - count++; if(cardsAbilities.size()) { for(unsigned int j = 0; j < cardsAbilities.size(); j++) { - if(dynamic_cast (cardsAbilities[j]) && dynamic_cast (cardsAbilities[j])->output->hasColor(color)) + AbilityFactory af(observer); + MTGAbility * toCheck = af.getCoreAbility(cardsAbilities[j]); + if(dynamic_cast (toCheck) && dynamic_cast (toCheck)->output->hasColor(color)) count++; } } diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index cd8224178..4c9b13da2 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -147,6 +147,10 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan { //Send to Graveyard Cost (move from anywhere to Graveyard) manaCost->addExtraCost(NEW ToGraveCost(tc)); } + else if (value.find("saclands") != string::npos) + { //Sac all lands + manaCost->addExtraCost(NEW SacLandsCost(tc)); + } else { //Sacrifice manaCost->addExtraCost(NEW SacrificeCost(tc)); diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index a8a7903e6..cbfe9ecd9 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -236,6 +236,11 @@ WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) : { } +WEventCardPhasesOut::WEventCardPhasesOut(MTGCardInstance * card) : + WEventCardUpdate(card) +{ +} + WEventCardPhasesIn::WEventCardPhasesIn(MTGCardInstance * card) : WEventCardUpdate(card) { @@ -427,6 +432,12 @@ Targetable * WEventCardControllerChange::getTarget(int target) return NULL; } +Targetable * WEventCardPhasesOut::getTarget(int target) +{ + if (target) return card; + return NULL; +} + Targetable * WEventCardPhasesIn::getTarget(int target) { if (target) return card;