From 09f4c408cd66232ec8b25b652ca5364a357802ff Mon Sep 17 00:00:00 2001 From: Vittorio Alfieri Date: Wed, 24 May 2023 15:15:52 +0200 Subject: [PATCH] Fixed some primitives, added new primitives from MAT set, improved filter for multicolored cards, added new keywords for handling multicolored cards. --- .../bin/Res/sets/primitives/borderline.txt | 271 +++++++++++++++--- projects/mtg/include/CardDescriptor.h | 2 + projects/mtg/src/CardDescriptor.cpp | 23 ++ projects/mtg/src/CardGui.cpp | 6 + projects/mtg/src/TargetChooser.cpp | 6 + projects/mtg/src/WParsedInt.cpp | 16 ++ 6 files changed, 292 insertions(+), 32 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index 92f08bb7a..1f9218032 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -5483,6 +5483,17 @@ power=3 toughness=3 [/card] [card] +name=Ayara's Oathsworn +abilities=menace +auto=@combatdamaged(player) from(this) restriction{compare(hascnt11)~lessthan~4}:name(Put 1/1 counter) name(Put 1/1 counter) counter(1/1) && if compare(hascnt11)~equalto~4 then name(Search card) name(Search card) target(*|mylibrary) moveto(myhand) and!( shuffle )! +text=Menace -- Whenever Ayara's Oathsworn deals combat damage to a player, if it has fewer than four +1/+1 counters on it, put a +1/+1 counter on it. Then if it has exactly four +1/+1 counters on it, search your library for a card, put it into your hand, then shuffle. +mana={1}{B} +type=Creature +subtype=Human Knight +power=2 +toughness=2 +[/card] +[card] name=Ayula's Influence auto={D(land|myhand)}:token(Bear,Creature Bear,2/2,green) text=Discard a land card: Create a 2/2 green Bear creature token. @@ -18573,7 +18584,7 @@ name=Crystal Carapace abilities=cycling target=creature auto=teach(creature) +3/+3 -auto=teach(creature) _WARD_(2) +auto=@targeted(mytgt) from(*|opponentstack):choice name(This spell costs 2 more) name(This spell costs 2 more) target(*|opponentstack) transforms((,newability[pay[[{2}]] name(pay 2 mana) donothing?fizzle])) oneshot autohand=__CYCLING__({2}) text=Enchant creature -- Enchanted creature gets +3/+3 and has ward {2}. -- Cycling {2} ({2}, Discard this card: Draw a card.) mana={3}{G} @@ -19545,6 +19556,17 @@ power=4 toughness=4 [/card] [card] +name=Danitha, New Benalia's Light +abilities=lifelink,trample,vigilance +auto={0}:name(Cast aura or equipment) target(*[aura;equipment]|mygraveyard) transforms((,newability[canplayfromgraveyard])) ueot limit:1 myturnonly +text=Vigilance, trample, lifelink -- Once during each of your turns, you may cast an Aura or Equipment spell from your graveyard. +mana={1}{G}{W} +type=Legendary Creature +subtype=Human Knight +power=2 +toughness=2 +[/card] +[card] name=Danse Macabre auto=name(Sacrifice a creature) target(creature[-token]|mybattlefield) sacrifice and!( transforms((,newability[phaseaction[endofturn once] removeallcounters(0/0.1.DanseEffect)],newability[counter(0/0.1.DanseEffect)],newability[@dierolled(this|mygraveyard) from(controller) once:if compare(lastrollresultplustoughnessplusend)~lessthan~15 then target(creature[counter{0/0.1.DanseEffect}]|graveyard) moveto(mybattlefield) else target(creature[counter{0/0.1.DanseEffect}]|graveyard) moveto(mybattlefield)],newability[name(Roll a d20) rolld20 20 winability donothing winabilityend rolld20end])) ueot )! auto=ability$!name(Sacrifice creature) name(Sacrifice creature) notatarget(creature[-token]|mybattlefield) sacrifice and!( transforms((,newability[phaseaction[endofturn once] removeallcounters(0/0.1.DanseEffect)],newability[counter(0/0.1.DanseEffect)])) ueot )! !$ opponent @@ -23831,6 +23853,13 @@ power=1 toughness=3 [/card] [card] +name=Drannith Ruins +auto={T}:name(Add mana) add{C} +auto={2}{T}:name(Put 1/1 counters) target(creature[-human&fresh]|mybattlefield) counter(1/1,2) +text={T}: Add {C}. -- {2}, {T}: Put two +1/+1 counters on target non-Human creature that entered the battlefield this turn. +type=Land +[/card] +[card] name=Drannith Stinger abilities=cycling auto=@cycled(*|myHand):damage:1 opponent @@ -36152,6 +36181,17 @@ text=(Transforms from Golden Guardian.) -- {T}: Add two mana of any one color. - type=Land [/card] [card] +name=Gold-Forged Thopteryx +abilities=flying,lifelink +auto=@targeted(*[legendary]|myBattlefield) from(*|opponentstack):choice name(This spell costs 2 more) name(This spell costs 2 more) target(*|opponentstack) transforms((,newability[pay[[{2}]] name(pay 2 mana) donothing?fizzle])) oneshot +text=Flying, lifelink -- Each legendary permanent you control has ward {2}. (Whenever it becomes the target of a spell or ability an opponent controls, counter it unless that player pays {2}.) +mana={W}{U} +type=Artifact Creature +subtype=Dinosaur Thopter +power=1 +toughness=3 +[/card] +[card] name=Golden Demise auto=_ASCEND_ auto=if type(City's Blessing|mybattlefield)~equalto~0 then all(creature|myBattlefield) -2/-2 ueot @@ -38094,17 +38134,8 @@ toughness=1 [/card] [card] name=Guildpact Paragon -aicode=activate transforms((,newability[if type(*[multicolor&zpos<=6]|mylibrary)~morethan~0 then target(*[multicolor&zpos<=6]|mylibrary) moveTo(myHand) and!( all(other *[zpos<=6]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )! else all(*[zpos<=6]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! ])) oneshot -auto=@movedTo(*[black&red&-green&-blue&-white]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[black&green&-red&-blue&-white]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[black&white&-green&-blue&-red]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[black&blue&-green&-red&-white]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[blue&red&-green&-black&-white]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[blue&green&-black&-red&-white]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[blue&white&-green&-red&-black]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[white&red&-green&-blue&-black]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[white&green&-red&-blue&-black]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend -auto=@movedTo(*[green&red&-white&-blue&-black]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend +aicode=activate transforms((,newability[if type(*[numofcols=2&zpos<=6]|mylibrary)~morethan~0 then target(*[numofcols=2&zpos<=6]|mylibrary) moveTo(myHand) and!( all(other *[zpos<=6]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )! else all(*[zpos<=6]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! ])) oneshot +auto=@movedTo(*[numofcols=2]|mystack):name(look top 6 cards) reveal:6 optionone name(Get multicolored card) target(*[numofcols=2]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend text=Whenever you cast a spell that's exactly two colors, look at the top six cards of your library. You may reveal a card that's exactly two colors from among them and put it into your hand. Put the rest on the bottom of your library in a random order. type=Artifact Creature subtype=Construct @@ -43990,7 +44021,7 @@ name=Inscription of Abundance kicker={2}{G} auto=if paid(kicker) then ability$!name(Target creature fights) may name(Target creature fights) target(creature|myBattlefield) transforms((,newability[target(creature|opponentBattlefield) dynamicability])) ueot!$ controller auto=if paid(kicker) then ability$!name(Gain life equal to power) may name(Gain life equal to power) target(player) life:power:highest:*:targetedpersonsbattlefield!$ controller -auto=if paid(kicker) then ability$!name(Put two +1/+1 counters) may name(Put two +1/+1 counters) target(creature) counter(1/1,2)!$ controller +auto=if paid(kicker) then ability$!name(Put two +1/+1 counters) may name(Put two +1/+1 counters) target(creature) counter(1/1,2)!$ controller auto=ifnot paid(kicker) then choice name(Put two +1/+1 counters) name(Put two +1/+1 counters) counter(1/1,2) target(creature) auto=ifnot paid(kicker) then choice name(Gain life equal to power) name(Gain life equal to power) target(player) life:power:highest:*:targetedpersonsbattlefield auto=ifnot paid(kicker) then choice name(Target creature fights) name(Target creature fights) target(creature|myBattlefield) transforms((,newability[target(creature|opponentBattlefield) dynamicability])) ueot @@ -46193,6 +46224,18 @@ power=5 toughness=5 [/card] [card] +name=Jirina, Dauntless General +auto={S}:name(Humans gain hexproof and indestructible) all(human|myBattlefield) transforms((,newability[opponentshroud],newability[indestructible])) ueot +auto=choice name(Exile opponent graveyard) all(creature|opponentgraveyard) moveto(ownerexile) +auto=choice name(Exile your graveyard) all(creature|mygraveyard) moveto(ownerexile) +text=When Jirina, Dauntless General enters the battlefield, exile target player's graveyard. -- Sacrifice Jirina: Humans you control gain hexproof and indestructible until end of turn. +mana={W}{B} +type=Legendary Creature +subtype=Human Soldier +power=2 +toughness=2 +[/card] +[card] name=Jirina Kudro auto=token(Human Soldier Jir)*pnumofcommandcast auto=lord(other creature[Human]|myBattlefield) 2/0 @@ -46816,7 +46859,7 @@ toughness=2 name=Kaho, Minamo Historian auto=name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(*[instant]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myexile)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend auto={0}{T}:name(mana value 0) castcard(normal) target(instant[manacost=0]|myexile) -auto={1}{T}:name(mana value 1) castcard(normal) target(instant[manacost=1]|myexile) +auto={1}{T}:name(mana value 1) castcard(normal) target(instant[manacost=1]|myexile) auto={2}{T}:name(mana value 2) castcard(normal) target(instant[manacost=2]|myexile) auto={3}{T}:name(mana value 3) castcard(normal) target(instant[manacost=3]|myexile) auto={4}{T}:name(mana value 4) castcard(normal) target(instant[manacost=4]|myexile) @@ -48810,6 +48853,18 @@ mana={1}{B}{R} type=Instant [/card] [card] +name=Kolaghan Warmonger +abilities=haste +aicode=activate transforms((,newability[if type(dragon[zpos<=6]|mylibrary)~morethan~0 then target(dragon[zpos<=6]|mylibrary) moveto(myhand) and!( all(*[zpos<=6]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!],newability[if type(dragon[zpos<=6]|mylibrary)~equalto~0 then all(*[zpos<=6]|mylibrary) moveto(myreveal) and!( bottomoflibrary )!])) oneshot +auto=_ATTACKING_name(Look top 6 card) reveal:6 optionone name(Put dragon in hand) target(dragon|reveal) moveto(myhand) optiononeend optiontwo target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend +text=Haste -- Whenever Kolaghan Warmonger attacks, look at the top six cards of your library. You may reveal a Dragon card from among them and put it into your hand. Put the rest on the bottom of your library in a random order. +mana={2}{R} +type=Creature +subtype=Ogre Warrior +power=3 +toughness=2 +[/card] +[card] name=Koll, the Forgemaster auto=lord(other creature[-token;geared]|mybattlefield) transforms((,newability[handdeath])) auto=lord(other creature[-token;enchanted]|mybattlefield) transforms((,newability[handdeath])) @@ -50585,6 +50640,16 @@ mana={5}{W} type=Enchantment [/card] [card] +name=Leyline Immersion +target=creature[legendary] +auto=teach(creature) transforms((,newability[this(variable{type:*[-land]:myrestrictedcastingzone}>0) {T}:name(Add 5 mana) name(Add 5 mana) thisforeach(variable{5}) ability$!name(Choose one) choice add{W} _ choice add{U} _ choice add{R} _ choice add{G} _ choice add{B}!$ controller])) +auto=@targeted(mytgt) from(*|opponentstack):choice name(This spell costs 2 more) name(This spell costs 2 more) target(*|opponentstack) transforms((,newability[pay[[{2}]] name(pay 2 mana) donothing?fizzle])) oneshot +text=Enchant legendary creature -- Enchanted creature has ward {2} and "{T}: Add five mana in any combination of colors. Spend this mana only to cast spells." +mana={3}{G} +type=Enchantment +subtype=Aura +[/card] +[card] name=Leyline Invocation auto=token(Fractal,Creature Fractal,0/0,green,blue) and!( counter(1/1,type:land:mybattlefield) )! text=Create a 0/0 green and blue Fractal creature token. Put X +1/+1 counters on it, where X is the number of lands you control. @@ -53790,6 +53855,19 @@ mana={3}{R} type=Sorcery [/card] [card] +name=Markov Baron +abilities=lifelink,madness +other={convoke} name(Convoke) +autoexile=restriction{discarded} pay({2}{B}) name(pay 2B to cast) activate name(pay 2B to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) +auto=lord(other vampire|myBattlefield) +1/+1 +text=Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of that creature's color.) -- Lifelink -- Other Vampires you control get +1/+1. -- Madness {2}{B} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.) +mana={2}{B} +type=Creature +subtype=Vampire Noble +power=2 +toughness=2 +[/card] +[card] name=Markov Enforcer auto=may name(Fight opponent creature) transforms((,newability[@movedto(creature|graveyard) from(opponentbattlefield) turnlimited:name(Create blood) token(Blood)],newability[target(creature|opponentbattlefield) dynamicability])) ueot auto=@movedto(other vampire|mybattlefield):may name(Fight opponent creature) transforms((,newability[@movedto(creature|graveyard) from(opponentbattlefield) turnlimited:name(Create blood) token(Blood)],newability[target(creature|opponentbattlefield) dynamicability])) ueot @@ -55473,7 +55551,7 @@ type=Instant [/card] [card] name=Mine Worker -auto={T}:name(gain life) if type(Power Plant Worker|mybattlefield)~morethan~0,type(Tower Worker|mybattlefield)~morethan~0 then life:3 else life:1 +auto={T}:name(gain life) if type(Power Plant Worker|mybattlefield)~morethan~0,type(Tower Worker|mybattlefield)~morethan~0 then life:3 else life:1 text={T}: You gain 1 life. If you control creatures named Power Plant Worker and Tower Worker, you gain 3 life instead. mana={2} type=Artifact Creature @@ -57950,7 +58028,8 @@ toughness=3 [/card] [card] name=Nascent Metamorph -auto=@combat(attacking,blocking) source(this):Reveal:1 revealzone(opponentLibrary) revealuntil(creature|opponentLibrary) optionone donothing optiononeend optiontwo name(Copy) target(creature|reveal) copy and!( all(*|reveal) moveto(ownerlibrary) and!(shuffle)! )! optiontwoend afterrevealedend revealend +aicode=activate transforms((,newability[all(*[zpos=oppofindfirsttypecreature]|opponentLibrary) copy and!( all(this) transforms((,newability[shuffe opponent],newability[phaseaction[endofturn once] flip(Nascent Metamorph) undocpy])) forever )!])) forever +auto=@combat(attacking,blocking) source(this):name(Reveal top cards) reveal:1 revealzone(opponentLibrary) revealuntil(creature|opponentLibrary) optionone name(Copy creature) target(creature|reveal) copy and!( all(this) transforms((,newability[phaseaction[endofturn once] flip(Nascent Metamorph) undocpy])) forever )! optiononeend optiontwo name(Put back) all(*|reveal) moveto(ownerlibrary) and!( shuffle )! optiontwoend afterrevealedend revealend text=Whenever Nascent Metamorph attacks or blocks, target opponent reveals cards from the top of their library until they reveal a creature card. Nascent Metamorph becomes a copy of that card until end of turn. Then that player puts all cards revealed this way on the bottom of their library in a random order. mana={1}{U} type=Creature @@ -57959,6 +58038,18 @@ power=1 toughness=1 [/card] [card] +name=Nashi, Moon's Legacy +abilities=menace +auto=_WARD_(1) +auto=_ATTACKING_name(Exile legendary or rat) target(*[legendary;rat]|mygraveyard) moveto(myexile) and!( transforms((,newability[canplayfromexile],newability[gainedexiledeath])) ueot )! +text=Menace, ward {1} -- Whenever Nashi, Moon's Legacy attacks, exile up to one target legendary or Rat card from your graveyard and copy it. You may cast the copy. (You still pay its costs. A copy of a permanent spell becomes a token.) +mana={B}{G}{U} +type=Legendary Creature +subtype=Rat Shaman +power=3 +toughness=4 +[/card] +[card] name=Nassari, Dean of Expression auto=@each my upkeep:name(Exile top card) all(*[zpos=1]|opponentlibrary) moveto(myexile) and!( if cantargetcard(*[land]|*) then moveto(ownerexile) else transforms((,newability[canplayfromexile],newability[anytypeofmana],newability[phaseaction[endofturn once checkex] moveTo(ownerexile)])) ueot )! auto=@movedto(*|mystack) from(myexile):counter(1/1) @@ -58375,7 +58466,7 @@ type=Land [card] name=Neera, Wild Mage aicode=activate transforms((,newability[all(*[zpos=findfirsttypenonland]|mylibrary) activate castcard(normal) and!( all(*[zpos<=findfirsttypenonland]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!])) oneshot -auto=@movedTo(*|mystack) restriction{thisturn(*|mystack)~equalto~0}:may name(Put on bottom) all(trigger[to]) bottomoflibrary and!( transforms((,newability[name(Reveal non-land card) reveal:1 revealzone(mylibrary) revealuntil(*[-land]|mylibrary) optionone choice name(Cast card) target(*[-land]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo choice name(Put on bottom) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshot optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!( activate castcard(normal) )! afterrevealedend revealend])) ueot )! +auto=@movedTo(*|mystack) restriction{thisturn(*|mystack)~equalto~0}:may name(Put on bottom) all(trigger[to]) bottomoflibrary and!( transforms((,newability[name(Reveal non-land card) reveal:1 revealzone(mylibrary) revealuntil(*[-land]|mylibrary) optionone choice name(Cast card) target(*[-land]|reveal) moveto(ownerlibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo choice name(Put on bottom) target(<1>*|reveal) transforms((,newability[all(*|reveal) bottomoflibrary])) oneshot optiontwoend afterrevealed all(tobecast|mylibrary) moveto(ownerlibrary) and!( activate castcard(normal) )! afterrevealedend revealend])) ueot )! text=Whenever you cast a spell, you may put it on the bottom of its owner's library. If you do, reveal cards from the top of your library until you reveal a nonland card. You may cast that card without paying its mana cost. Then put all revealed cards not cast this way on the bottom of your library in a random order. This ability triggers only once each turn. mana={4}{U}{R} type=Legendary Creature @@ -59217,7 +59308,7 @@ name=Nim Deathmantle auto={4}:equip auto=teach(creature) 2/2 auto=teach(creature) transforms((Zombie,newcolors[black],newability[intimidate])) -auto=@movedTo(*[-token]|mygraveyard) from(battlefield):all(trigger[to]) transforms((,newability[pay[[{4}]] moveTo(mybattlefield)])) and!(rehook)! +auto=@movedTo(*[-token]|mygraveyard) from(battlefield):all(trigger[to]) transforms((,newability[pay[[{4}]] moveTo(mybattlefield)])) and!(rehook)! text=Equipped creature gets +2/+2, has intimidate, and is a black Zombie. -- Whenever a nontoken creature is put into your graveyard from the battlefield, you may pay {4}. If you do, return that card to the battlefield and attach Nim Deathmantle to it. -- Equip {4} mana={2} type=Artifact @@ -59463,6 +59554,18 @@ type=Enchantment subtype=Aura [/card] [card] +name=Nissa, Resurgent Animist +aicode=activate transforms((,newability[if type(*[elf;elemental]|mylibrary)~equalto~0 then shuffle],newability[if type(elf|mylibrary)~equalto~0 then if type(elemental|mylibrary)~morethan~0 then all(*[zpos=findfirsttypeelemental]|mylibrary) moveto(myhand) and!( all(*[zpos<=findfirsttypeelemental]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!],newability[if type(elf|mylibrary)~morethan~0 then all(*[zpos=findfirsttypeelf]|mylibrary) moveto(myhand) and!( all(*[zpos<=findfirsttypeelf]|mylibrary) moveto(myreveal) and!( bottomoflibrary )! )!])) oneshot +auto=@movedTo(land|myBattlefield):name(Add 1 mana) ability$!name(Choose one) choice add{W} _ choice add{U} _ choice add{R} _ choice add{G} _ choice add{B}!$ controller +auto=@movedTo(land|myBattlefield) restriction{thisturn(land[fresh]|myBattlefield)~equalto~1}:name(Reveal cards) name(Reveal cards) Reveal:1 revealzone(mylibrary) revealuntil(*[elf;elemental]|mylibrary) optionone name(Put in hand) target(*[elf;elemental]|reveal) moveto(myhand) optiononeend optiontwo name(Put on bottom) target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend +text=Landfall — Whenever a land enters the battlefield under your control, add one mana of any color. Then if this is the second time this ability has resolved this turn, reveal cards from the top of your library until you reveal an Elf or Elemental card. Put that card into your hand and the rest on the bottom of your library in a random order. +mana={2}{G} +type=Legendary Creature +subtype=Elf Scout +power=3 +toughness=3 +[/card] +[card] name=Nissa, Vastwood Seer backside=Nissa, Sage Animist restriction=compare(isflipped)~equalto~0 @@ -59477,6 +59580,18 @@ power=2 toughness=2 [/card] [card] +name=Niv-Mizzet, Parun +abilities=nofizzle, flying +auto=@drawof(player):damage:1 target(player,creature,planeswalker) +auto=@movedTo(instant,sorcery|stack):draw:1 +text=This spell can't be countered. -- Flying -- Whenever you draw a card, Niv-Mizzet, Parun deals 1 damage to any target. -- Whenever a player casts an instant or sorcery spell, you draw a card. +mana={U}{U}{U}{R}{R}{R} +type=Legendary Creature +subtype=Dragon Wizard +power=5 +toughness=5 +[/card] +[card] name=Niv-Mizzet Reborn abilities=flying auto=reveal:10 optionone name(Reveal) target(*[multicolor]|reveal) moveto(myhand) optiononeend optiontwo choice all(*|reveal) moveto(mylibrary) optiontwoend revealend @@ -59488,14 +59603,15 @@ power=6 toughness=6 [/card] [card] -name=Niv-Mizzet, Parun -abilities=nofizzle, flying -auto=@drawof(player):damage:1 target(player,creature,planeswalker) -auto=@movedTo(instant,sorcery|stack):draw:1 -text=This spell can't be countered. -- Flying -- Whenever you draw a card, Niv-Mizzet, Parun deals 1 damage to any target. -- Whenever a player casts an instant or sorcery spell, you draw a card. -mana={U}{U}{U}{R}{R}{R} +name=Niv-Mizzet, Supreme +abilities=flying +auto=protection from(*[numofcols=1]) +auto=lord(instant[numofcols=2]|mygraveyard) transforms((,newability[{D(land|myhand)}:name(Discard land and gain flashback) name(Discard land and gain flashback) tempflashback ueot limit:1])) +auto=lord(sorcery[numofcols=2]|mygraveyard) transforms((,newability[{D(land|myhand)}:name(Discard land and gain flashback) name(Discard land and gain flashback) tempflashback ueot limit:1])) +text=Flying, hexproof from monocolored -- Each instant and sorcery card in your graveyard that's exactly two colors has jump-start. (You may cast that card from your graveyard by discarding a card in addition to paying its other costs. Then exile it.) +mana={W}{U}{B}{R}{G} type=Legendary Creature -subtype=Dragon Wizard +subtype=Dragon Avatar power=5 toughness=5 [/card] @@ -60086,6 +60202,18 @@ power=2 toughness=2 [/card] [card] +name=Ob Nixilis, Captive Kingpin +abilities=flying,trample +auto=@lifelostfoeof(player) restriction{compare(thatmuch)~equalto~1}:name(Exile top card) all(*[zpos=1]|mylibrary) moveto(myexile) and!( transforms((,newability[canplayfromexile])) uent )! +auto=@lifelostfoeof(player) restriction{compare(thatmuch)~equalto~1}:name(Put 1/1 counter) counter(1/1) +text=Flying, trample -- Whenever one or more opponents each lose exactly 1 life, put a +1/+1 counter on Ob Nixilis, Captive Kingpin. Exile the top card of your library. Until your next end step, you may play that card. +mana={2}{B}{R} +type=Legendary Creature +subtype=Demon +power=4 +toughness=3 +[/card] +[card] name=Ob Nixilis's Cruelty target=creature auto=exiledeath @@ -60906,7 +61034,6 @@ toughness=1 [/card] [card] name=Omnath, Locus of All -#MISSING: Check if revealed card has three or more colored mana symbols. auto=mypoolsave(red) auto=mypoolsave(white) auto=mypoolsave(black) @@ -60960,8 +61087,8 @@ auto=@each cleanup restriction{compare(mygreenpoolcount)~morethan~0}:thisforeach auto=@each cleanup restriction{compare(myredpoolcount)~morethan~0}:thisforeach(variable{myredpoolcount})add{B} && removemana({R}) auto=@each cleanup restriction{compare(mycolorlesspoolcount)~morethan~0}:thisforeach(variable{mycolorlesspoolcount}) add{B} && removemana({C}) auto=@each cleanup restriction{compare(mywhitepoolcount)~morethan~0}:thisforeach(variable{mywhitepoolcount}) add{B} && removemana({W}) -aicode=activate transforms((,newability[all(*[zpos=1]|mylibrary) moveto(myhand)])) oneshot -auto=@each my firstmain:name(Look top card) reveal:1 optionone name(Put in hand) target(*|reveal) moveto(myhand) oneshot optiononeend optiontwo all(*|reveal) moveto(myhand) optiontwoend revealend +aicode=activate transforms((,newability[all(*[zpos=1]|mylibrary) transforms((,newability[choice name(Draw and don't reveal) draw:1 controller],newability[if compare(hasmansymw)~morethan~0 then if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymb)~morethan~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{5}) ability$!name(add mana) choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{U}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymg)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymu)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{B} _ choice add{U} _ choice add{W}!$ controller])) oneshot])) oneshot +auto=@each my firstmain:name(Look top card) reveal:1 optionone name(Draw or reveal) target(*|reveal) moveto(mylibrary) and!( becomes(tobecast) ueot )! oneshot optiononeend optiontwo all(*|reveal) moveto(mylibrary) optiontwoend afterrevealed all(tobecast|mylibrary) transforms((,newability[choice name(Draw and don't reveal) draw:1 controller],newability[if compare(hasmansymw)~morethan~0 then if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymb)~morethan~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{5}) ability$!name(add mana) choice add{G} _ choice add{R} _ choice add{U} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{4}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{B}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{U}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymg)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{G} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymu)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymb)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymr)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymg)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{R} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{U}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymb)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymu)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{B} _ choice add{W}!$ controller],newability[if compare(hasmansymg)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymb)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{G} _ choice add{U} _ choice add{W}!$ controller],newability[if compare(hasmansymb)~morethan~0 then if compare(hasmansymu)~morethan~0 then if compare(hasmansymw)~morethan~0 then if compare(hasmansymg)~equalto~0 then if compare(hasmansymr)~equalto~0 then choice name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) name(Reveal and add mana) thisforeach(variable{3}) ability$!name(add mana) choice add{B} _ choice add{U} _ choice add{W}!$ controller])) oneshot afterrevealedend revealend text=If you would lose unspent mana, that mana becomes black instead. -- At the beginning of your precombat main phase, look at the top card of your library. You may reveal that card if it has three or more colored mana symbols in its mana cost. If you do, add three mana in any combination of its colors and put it into your hand. If you don't reveal it, put it into your hand. other={W}{U}{R}{G}{L:2} name(Pay 2 life) mana={W}{U}{B}{R}{G} @@ -64060,6 +64187,18 @@ power=3 toughness=3 [/card] [card] +name=Pia Nalaar, Consul of Revival +auto=lord(thopter|myBattlefield) haste +auto=@movedto(land|mybattlefield) from(myexile):name(Create thopter) token(Thopter,Artifact Creature Thopter,1/1,flying) +auto=@movedto(*|mystack) from(myexile):name(Create thopter) token(Thopter,Artifact Creature Thopter,1/1,flying) +text=Thopters you control have haste. -- Whenever you play a land from exile or cast a spell from exile, create a 1/1 colorless Thopter artifact creature token with flying. +mana={R}{W} +type=Legendary Creature +subtype=Human Artificer +power=2 +toughness=3 +[/card] +[card] name=Pierce the Sky target=creature[flying] auto=damage:7 @@ -65283,7 +65422,7 @@ type=Artifact Land [/card] [card] name=Power Plant Worker -auto={3}:name(Power up) if type(Mine Worker|mybattlefield)~morethan~0,type(Tower Worker|mybattlefield)~morethan~0 then counter(1/1,2) limit:1 else 2/2 ueot limit:1 +auto={3}:name(Power up) if type(Mine Worker|mybattlefield)~morethan~0,type(Tower Worker|mybattlefield)~morethan~0 then counter(1/1,2) limit:1 else 2/2 ueot limit:1 text={3}: Power Plant Worker gets +2/+2 until end of turn. If you control creatures named Mine Worker and Tower Worker, put two +1/+1 counters on Power Plant Worker instead. Activate only once each turn. mana={5} type=Artifact Creature @@ -69109,6 +69248,16 @@ mana={W} type=Instant [/card] [card] +name=Rebuild the City +target=land +auto=clone and!( transforms((Creature,setpower=3,settoughness=3,newability[vigilance],newability[menace])) forever )! +auto=clone and!( transforms((Creature,setpower=3,settoughness=3,newability[vigilance],newability[menace])) forever )! +auto=clone and!( transforms((Creature,setpower=3,settoughness=3,newability[vigilance],newability[menace])) forever )! +text=Choose target land. Create three tokens that are copies of it, except they're 3/3 creatures in addition to their other types and they have vigilance and menace. (They're affected by summoning sickness.) +mana={3}{B}{R}{G} +type=Sorcery +[/card] +[card] name=Recalibrate target=creature auto=moveTo(ownerhand) @@ -73688,6 +73837,17 @@ mana={R} type=Instant [/card] [card] +name=Samut, Vizier of Naktamun +abilities=first strike,haste,vigilance +auto=@combatdamaged(player) from(creature[fresh]|mybattlefield):name(Draw a card) draw:1 controllet +text=First strike, vigilance, haste -- Whenever a creature you control deals combat damage to a player, if that creature entered the battlefield this turn, draw a card. +mana={1}{R}{G} +type=Legendary Creature +subtype=Human Warrior Cleric +power=2 +toughness=3 +[/card] +[card] name=Samut, Voice of Dissent abilities=flash, double strike, vigilance, haste auto=lord(other creature|mybattlefield) haste @@ -76980,7 +77140,7 @@ type=Instant [card] name=Shalai and Hallar abilities=flying,vigilance -auto=@counteradded(1/1) source(creature|myBattlefield):damage:1 target(opponent) +auto=@counteradded(1/1) source(creature|myBattlefield):damage:1 target(opponent) text=Flying, vigilance -- Whenever one or more +1/+1 counters are put on a creature you control, Shalai and Hallar deals that much damage to target opponent. mana={1}{R}{G}{W} type=Legendary Creature @@ -78352,6 +78512,18 @@ power=4 toughness=4 [/card] [card] +name=Sigarda, Font of Blessings +abilities=flying,showfromtoplibrary +auto=lord(other *|myBattlefield) opponentshroud +auto=aslongas(angel[zpos=1]|mylibrary) canplayfromlibrarytop >0 +text=Flying -- Other permanents you control have hexproof. -- You may look at the top card of your library any time. -- You may cast Angel spells and Human spells from the top of your library. +mana={2}{G}{W} +type=Legendary Creature +subtype=Angel +power=4 +toughness=4 +[/card] +[card] name=Sigardian Evangel auto=name(Conjure a card) conjure cards(Sigardian Evangel) zone(myhand) and!( transforms((,newability[@each endofturn:name(Discard) reject])) ueot )! auto=name(Tap a permanent) tap target(*|opponentBattlefield) @@ -88770,7 +88942,7 @@ auto=@each my firstmain:counter(0/0,1,Lore) auto=name(Damage opponent and creatures) damage:3 opponent && damage:3 all(creature|opponentbattlefield) auto=@counteradded(0/0,1,Lore) from(this):this(counter{0/0.2.Lore}=) name(Create 3 treasures) token(Treasure Sur)*3 auto=@counteradded(0/0,1,Lore) from(this):this(counter{0/0.3.Lore}) name(Cast spells from graveyard) name(Cast spells from graveyard) all(*[instant;sorcery]|mygraveyard) transforms((,newability[canplayfromgraveyard],newability[gainedexiledeath])) ueot -auto=@counteradded(0/0,1,Lore) from(this):this(counter{0/0.3.Lore}) name(Exile and return) moveto(myexile) and!( moveto(mybattlefield) and!( transforms((,newability[becomes(Legendary) forever],newability[@movedto(*[instant;sorcery]|mygraveyard):name(Cast spells from graveyard) name(Cast spells from graveyard) all(trigger[to]) transforms((,newability[canplayfromgraveyard],newability[gainedexiledeath])) ueot])) ueot )! )! +auto=@counteradded(0/0,1,Lore) from(this):this(counter{0/0.3.Lore}) name(Exile and return) moveto(myexile) and!( moveto(mybattlefield) and!( transforms((,newability[becomes(Legendary) forever],newability[@movedto(*[instant;sorcery]|mygraveyard):name(Cast spells from graveyard) name(Cast spells from graveyard) all(trigger[to]) transforms((,newability[canplayfromgraveyard],newability[gainedexiledeath])) ueot])) ueot )! )! text=(As this Saga enters and after your draw step, add a lore counter.) -- I — The Great Work deals 3 damage to target opponent and each creature they control. -- II — Create three Treasure tokens. -- III — Until end of turn, you may cast instant and sorcery spells from any graveyard. If a spell cast this way would be put into a graveyard, exile it instead. Exile The Great Work, then return it to the battlefield (front face up). color=red type=Enchantment @@ -93742,7 +93914,7 @@ type=Sorcery [card] name=Unquenchable Fury target=creature -auto=teach(creature) transforms((,newability[_ATTACKING_damage:type:*:opponenthand opponent])) +auto=teach(creature) transforms((,newability[_ATTACKING_damage:type:*:opponenthand opponent])) autograveyard=_DIES_moveTo(ownerhand) text=Enchant creature -- Enchanted creature has "Whenever this creature attacks, it deals X damage to defending player, where X is the number of cards in their hand." -- When Unquenchable Fury is put into your graveyard from the battlefield, return it to your hand. mana={2}{R} @@ -93953,6 +94125,29 @@ mana={B} type=Sorcery [/card] [card] +name=Urborg Scavengers +auto=if type(creature|graveyard)~morethan~0 then name(Exile creature) name(Exile creature) transforms((,newability[counter(1/1)],newability[target(creature|graveyard) moveto(exile) and!( counter(0/0.1.UrborgExiled) )!])) oneshot +auto=@combat(attacking) source(this) restriction{type(creature|graveyard)~morethan~0}:name(Exile creature) name(Exile creature) transforms((,newability[counter(1/1)],newability[target(creature|graveyard) moveto(exile) and!( counter(0/0.1.UrborgExiled) )!])) oneshot +auto=aslongas(creature[flying&counter{0/0.1.UrborgExiled}]|exile) flying +auto=aslongas(creature[first strike&counter{0/0.1.UrborgExiled}]|exile) first strike +auto=aslongas(creature[double strike&counter{0/0.1.UrborgExiled}]|exile) double strike +auto=aslongas(creature[deathtouch&counter{0/0.1.UrborgExiled}]|exile) deathtouch +auto=aslongas(creature[haste&counter{0/0.1.UrborgExiled}]|exile) haste +auto=aslongas(creature[opponentshroud&counter{0/0.1.UrborgExiled}]|exile) opponentshroud +auto=aslongas(creature[indestructible&counter{0/0.1.UrborgExiled}]|exile) indestructible +auto=aslongas(creature[lifelink&counter{0/0.1.UrborgExiled}]|exile) lifelink +auto=aslongas(creature[menace&counter{0/0.1.UrborgExiled}]|exile) menace +auto=aslongas(creature[reach&counter{0/0.1.UrborgExiled}]|exile) reach +auto=aslongas(creature[menace&counter{0/0.1.UrborgExiled}]|exile) menace +auto=aslongas(creature[vigilance&counter{0/0.1.UrborgExiled}]|exile) vigilance +text=Whenever Urborg Scavengers enters the battlefield or attacks, exile target card from a graveyard. Put a +1/+1 counter on Urborg Scavengers. -- Urborg Scavengers has flying as long as a card exiled with it has flying. The same is true for first strike, double strike, deathtouch, haste, hexproof, indestructible, lifelink, menace, reach, trample, and vigilance. +mana={2}{B} +type=Creature +subtype=Spirit +power=2 +toughness=2 +[/card] +[card] name=Urgoros, the Empty One abilities=flying auto=@combatdamaged(player) from(this):ability$!name(discard) reject notatarget(*|myhand)!$ @@ -95431,6 +95626,18 @@ power=2 toughness=1 [/card] [card] +name=Vesuvan Drifter +abilities=flying,showfromtoplibrary +aicode=activate transforms((,newability[all(creature[zpos=1]|mylibrary) copy and!( all(this) transforms((,newability[flying],newability[phaseaction[endofturn once] flip(Vesuvan Drifter) undocpy])) ueot )!])) oneshot +auto=@each combatbegins:may name(Reveal top card) reveal:1 optionone name(Copy revealed creature) target(creature|reveal) moveto(mylibrary) and!( becomes(tobecopied) ueot )! optiononeend optiontwo target(*|reveal) moveto(mylibrary) optiontwoend afterrevealed all(tobecopied|mylibrary) copy and!( all(this) transforms((,newability[flying],newability[phaseaction[endofturn once] flip(Vesuvan Drifter) undocpy])) ueot )! afterrevealedend revealend +text=Flying -- You may look at the top card of your library any time. -- At the beginning of each combat, you may reveal the top card of your library. If you reveal a creature card this way, Vesuvan Drifter becomes a copy of that card until end of turn, except it has flying. +mana={2}{U} +type=Creature +subtype=Shapeshifter +power=2 +toughness=4 +[/card] +[card] name=Veteran Adventurer abilities=vigilance,affinityparty auto=becomes(Cleric Rogue Warrior Wizard) forever diff --git a/projects/mtg/include/CardDescriptor.h b/projects/mtg/include/CardDescriptor.h index bd155d13a..c9806af8d 100644 --- a/projects/mtg/include/CardDescriptor.h +++ b/projects/mtg/include/CardDescriptor.h @@ -45,6 +45,8 @@ class CardDescriptor: public MTGCardInstance int convertedManacost; // might fit better into MTGCardInstance? int zposComparisonMode; int zposition; + int numofColorsComparisonMode; + int numofColors; int hasKickerCost; int hasConvokeCost; int hasFlashbackCost; diff --git a/projects/mtg/src/CardDescriptor.cpp b/projects/mtg/src/CardDescriptor.cpp index 805c5a1f9..90bc7c0a6 100644 --- a/projects/mtg/src/CardDescriptor.cpp +++ b/projects/mtg/src/CardDescriptor.cpp @@ -4,6 +4,7 @@ #include "Subtypes.h" #include "Counters.h" #include "ExtraCost.h" +#include "WParsedInt.h" CardDescriptor::CardDescriptor() : MTGCardInstance(), mColorExclusions(0) @@ -21,6 +22,8 @@ CardDescriptor::CardDescriptor() manacostComparisonMode = COMPARISON_NONE; counterComparisonMode = COMPARISON_NONE; convertedManacost = -1; + numofColorsComparisonMode = COMPARISON_NONE; + numofColors = -1; zposComparisonMode = COMPARISON_NONE; zposition = -1; hasKickerCost = 0; @@ -199,6 +202,16 @@ MTGCardInstance * CardDescriptor::match_or(MTGCardInstance * card) } else if(!valueInRange(toughnessComparisonMode, card->getToughness(), toughness)) return NULL; } + if (numofColorsComparisonMode){ + int totalcolor = 0; + WParsedInt* value = NEW WParsedInt("mycolnum", NULL, card); + if(value){ + totalcolor = value->getValue(); + SAFE_DELETE(value); + } + if(!valueInRange(numofColorsComparisonMode, totalcolor, numofColors)) + return NULL; + } if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->myconvertedcost, convertedManacost)) return NULL; if (zposComparisonMode && !valueInRange(zposComparisonMode, card->zpos, zposition)) @@ -256,6 +269,16 @@ MTGCardInstance * CardDescriptor::match_and(MTGCardInstance * card) } else if(!valueInRange(toughnessComparisonMode, card->getToughness(), toughness)) return NULL; } + if (numofColorsComparisonMode){ + int totalcolor = 0; + WParsedInt* value = NEW WParsedInt("mycolnum", NULL, card); + if(value){ + totalcolor = value->getValue(); + SAFE_DELETE(value); + } + if(!valueInRange(numofColorsComparisonMode, totalcolor, numofColors)) + return NULL; + } if (manacostComparisonMode && !valueInRange(manacostComparisonMode, card->myconvertedcost, convertedManacost)) match = NULL; if (zposComparisonMode && !valueInRange(zposComparisonMode, card->zpos, zposition)) diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 81c4c920a..ed2973780 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -1749,6 +1749,12 @@ bool CardGui::FilterCard(MTGCard * _card,string filter) } } + else if (attribute.find("numofcols") != string::npos) + { + //Number of color restrictions + cd.numofColors = comparisonCriterion; + cd.numofColorsComparisonMode = comparisonMode; + } else if (attribute.find("power") != string::npos) { //Power restrictions diff --git a/projects/mtg/src/TargetChooser.cpp b/projects/mtg/src/TargetChooser.cpp index 31ff7191d..0c2993f38 100644 --- a/projects/mtg/src/TargetChooser.cpp +++ b/projects/mtg/src/TargetChooser.cpp @@ -917,6 +917,12 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta } } + else if (attribute.find("numofcols") != string::npos) + { + //Number of color restrictions + cd->numofColors = comparisonCriterion; + cd->numofColorsComparisonMode = comparisonMode; + } else if (attribute.find("power") != string::npos) { //Power restrictions diff --git a/projects/mtg/src/WParsedInt.cpp b/projects/mtg/src/WParsedInt.cpp index b12eb2b53..f5d92e3bb 100644 --- a/projects/mtg/src/WParsedInt.cpp +++ b/projects/mtg/src/WParsedInt.cpp @@ -1565,6 +1565,22 @@ void WParsedInt::extendedParse(string s, Spell * spell, MTGCardInstance * card) } intValue = hasdeadtype; } + else if(s.find("hasmansym") != string::npos){ + string manatocheck = s.substr(9); + if(manatocheck == "c") + intValue = card->getManaCost()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_ARTIFACT); + else if(manatocheck == "g") + intValue = card->getManaCost()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_GREEN); + else if(manatocheck == "u") + intValue = card->getManaCost()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_BLUE); + else if(manatocheck == "r") + intValue = card->getManaCost()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_RED); + else if(manatocheck == "b") + intValue = card->getManaCost()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_BLACK); + else if(manatocheck == "w") + intValue = card->getManaCost()->getManaSymbolsHybridMerged(Constants::MTG_COLOR_WHITE); + else intValue = 0; + } else if(!intValue)//found nothing, try parsing a atoi { intValue = atoi(s.c_str());