From 2f4869434cccb887d0954ef150e13efeee2e8d07 Mon Sep 17 00:00:00 2001 From: Vittorio Alfieri Date: Tue, 17 Aug 2021 23:34:05 +0200 Subject: [PATCH] Added/fixed primitives and macros, fixed RIX and CN2 sets in order to allow images for Monarch and City's Blessing ebmlems, updated all cards with "Monarch" and "Ascend" related abilities, improved "token" keyword in order to allow the usage of "notrigger" option even when we are creating a named token, moved Monarch rules from general txt files to the specific Monarch emblem, improved Android downloader for RIX set. --- .../src/net/wagic/utils/ImgDownloader.java | 6 +- projects/mtg/bin/Res/rules/Commander.txt | 4 - projects/mtg/bin/Res/rules/mtg.txt | 4 - projects/mtg/bin/Res/sets/CN2/_cards.dat | 10 +- projects/mtg/bin/Res/sets/RIX/_cards.dat | 7 +- .../mtg/bin/Res/sets/primitives/_macros.txt | 8 +- .../bin/Res/sets/primitives/borderline.txt | 260 ++++++++++-------- projects/mtg/bin/Res/sets/primitives/mtg.txt | 54 ++-- .../bin/Res/sets/primitives/planeswalkers.txt | 2 +- projects/mtg/src/MTGAbility.cpp | 14 +- 10 files changed, 204 insertions(+), 165 deletions(-) diff --git a/projects/mtg/Android/src/net/wagic/utils/ImgDownloader.java b/projects/mtg/Android/src/net/wagic/utils/ImgDownloader.java index de0accfbd..838fc4910 100644 --- a/projects/mtg/Android/src/net/wagic/utils/ImgDownloader.java +++ b/projects/mtg/Android/src/net/wagic/utils/ImgDownloader.java @@ -1217,8 +1217,10 @@ public class ImgDownloader { cardurl = "https://img.scryfall.com/cards/large/front/b/8/b86ac828-7b49-4663-a718-99fcac904568.jpg?1561756381"; else if(id.equals("476097t") || id.equals("293685t") || id.equals("293652t") || id.equals("296775t")) //Zombie 2/2 cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/b/5/b5bd6905-79be-4d2c-a343-f6e6a181b3e6.jpg?1562844819"; - else if(id.equals("999901t")) + else if(id.equals("999901t")) //Monarch Token cardurl = "https://img.scryfall.com/cards/large/front/4/0/40b79918-22a7-4fff-82a6-8ebfe6e87185.jpg?1561897497"; + else if(id.equals("999902t")) //City's Blessing + cardurl = "https://c1.scryfall.com/file/scryfall-cards/large/front/b/a/ba64ed3e-93c5-406f-a38d-65cc68472122.jpg?1561757924"; else if(id.equals("19462t") || id.equals("19463t") || id.equals("19464t") || id.equals("19465t")) cardurl = "https://img.scryfall.com/cards/large/front/d/2/d2f51f4d-eb6d-4503-b9a4-559db1b9b16f.jpg?1574710411"; else if(id.equals("19476t") || id.equals("19477t")) @@ -2899,7 +2901,7 @@ public class ImgDownloader { set.equals("BOK") || set.equals("CHK") || set.equals("ZNR") || set.equals("KHM") || set.equals("STX")) rarity = ""; - if(id != null && (id.equals("209162") || id.equals("209163") || id.equals("401721") || id.equals("401722"))) + if(id != null && (id.equals("209162") || id.equals("209163") || id.equals("401721") || id.equals("401722") || id.equals("999902"))) rarity = "t"; if(id != null && (id.equals("1750411") || id.equals("5176911") || id.equals("44680711") || id.equals("29530711") || id.equals("45108910") || id.equals("530447") || id.equals("530448") || id.equals("530449") || id.equals("297220") || diff --git a/projects/mtg/bin/Res/rules/Commander.txt b/projects/mtg/bin/Res/rules/Commander.txt index 54a41dae2..0b550c20e 100644 --- a/projects/mtg/bin/Res/rules/Commander.txt +++ b/projects/mtg/bin/Res/rules/Commander.txt @@ -84,10 +84,6 @@ auto=@movedto(other *|nonbattlezone) restriction{type(*[isflipped]|nonbattlezone auto=@movedto(other *|stack) restriction{type(*[isflipped]|nonbattlezone)~morethan~0}:ability$!all(*[isflipped]|nonbattlezone) doubleside()!$ controller auto=@movedto(other *|battlefield) restriction{type(*[isflipped]|nonbattlezone)~morethan~0}:ability$!all(*[isflipped]|nonbattlezone) doubleside()!$ controller -#Monarch rule -auto=@each my endofturn restriction{compare(pmonarch)~morethan~0}:draw:1 -auto=@combatdamageof(player) restriction{compare(pmonarch)~morethan~0}:becomesmonarch opponent - #reset Creature damage at the cleanup phase auto=@each cleanup:all(*|myBattlefield) resetDamage diff --git a/projects/mtg/bin/Res/rules/mtg.txt b/projects/mtg/bin/Res/rules/mtg.txt index 281d06485..b7711c45b 100644 --- a/projects/mtg/bin/Res/rules/mtg.txt +++ b/projects/mtg/bin/Res/rules/mtg.txt @@ -83,9 +83,5 @@ auto=@movedto(other *|nonbattlezone) restriction{type(*[isflipped]|nonbattlezone auto=@movedto(other *|stack) restriction{type(*[isflipped]|nonbattlezone)~morethan~0}:ability$!all(*[isflipped]|nonbattlezone) doubleside()!$ controller auto=@movedto(other *|battlefield) restriction{type(*[isflipped]|nonbattlezone)~morethan~0}:ability$!all(*[isflipped]|nonbattlezone) doubleside()!$ controller -#Monarch rule -auto=@each my endofturn restriction{compare(pmonarch)~morethan~0}:draw:1 -auto=@combatdamageof(player) restriction{compare(pmonarch)~morethan~0}:becomesmonarch opponent - #reset Creature damage at the cleanup phase auto=@each cleanup:all(*|myBattlefield) resetDamage \ No newline at end of file diff --git a/projects/mtg/bin/Res/sets/CN2/_cards.dat b/projects/mtg/bin/Res/sets/CN2/_cards.dat index 32e19cae0..5ce0fca03 100644 --- a/projects/mtg/bin/Res/sets/CN2/_cards.dat +++ b/projects/mtg/bin/Res/sets/CN2/_cards.dat @@ -6,6 +6,11 @@ year=2016-08-26 total=222 [/meta] [card] +primitive=Monarch Token +id=-999901 +rarity=T +[/card] +[card] primitive=Adriana's Valor id=416758 rarity=C @@ -1110,8 +1115,3 @@ primitive=Shimmering Grotto id=416978 rarity=U [/card] -[card] -primitive=Monarch Token -id=999901 -rarity=T -[/card] diff --git a/projects/mtg/bin/Res/sets/RIX/_cards.dat b/projects/mtg/bin/Res/sets/RIX/_cards.dat index e139e127e..494d4dc28 100644 --- a/projects/mtg/bin/Res/sets/RIX/_cards.dat +++ b/projects/mtg/bin/Res/sets/RIX/_cards.dat @@ -4,9 +4,14 @@ name=Rivals of Ixalan block=Ixalan orderindex=EXP-ZZ8.RIX year=2018-01-19 -total=213 +total=214 [/meta] [card] +primitive=City's_blessing +id=-999902 +rarity=T +[/card] +[card] primitive=Elemental Phoenix id=-439768 rarity=T diff --git a/projects/mtg/bin/Res/sets/primitives/_macros.txt b/projects/mtg/bin/Res/sets/primitives/_macros.txt index ca23508ff..f9ac3c8d5 100644 --- a/projects/mtg/bin/Res/sets/primitives/_macros.txt +++ b/projects/mtg/bin/Res/sets/primitives/_macros.txt @@ -104,22 +104,22 @@ $AUTO_DEFINE _CLASH_ Put here a code if compare the casting cost based on Errati #AUTO_DEFINE _OUTLAST_($cost) {$cost}{$cost}:counter(1/1,1) all(this) asSorcery # Investigate token, Shadows over Innistrad SOI -#AUTO_DEFINE _INVESTIGATE_ create(Clue:Artifact:0/0:"{2}, Sacrifice this artifact: Draw a card.") and!( transforms((,newability[{2}{S}:draw:1 controller])) forever )! +#AUTO_DEFINE _INVESTIGATE_ token(Clue) # Soulshift #AUTO_DEFINE _SOULSHIFT_($c) @movedTo(this|myGraveyard) from(battlefield):may moveTo(myHand) target(creature[spirit;manacost<=$c]|myGraveyard) # Ascend, Set XLN -#AUTO_DEFINE _ASCEND_ if type(*[city's_blessing]|mybattlefield)~lessthan~1 then transforms((,newability[if type(*|mybattlefield)~morethan~9 then create(city's_blessing:city's_blessing:0/0:shroud:indestructible)])) +#AUTO_DEFINE _ASCEND_ if type(*[City's_blessing]|mybattlefield)~lessthan~1 then transforms((,newability[if type(*|mybattlefield)~morethan~9 then token(City's_blessing^notrigger)])) oneshot # Effect with the City's blessing, Set XLN -#AUTO_DEFINE _CITY'S_BLESSING_ aslongas(*[city's_blessing]|mybattlefield)>0 +#AUTO_DEFINE _CITY'S_BLESSING_ aslongas(*[City's_blessing]|mybattlefield)>0 # Explore #AUTO_DEFINE _EXPLORE_ reveal:1 optionone if type(land|reveal)~lessthan~1 then transforms((,newability[counter(1/1)])) optiononeend optiontwo if type(land|reveal)~morethan~0 then name(move to Hand) target(<1>*|reveal) moveto(myHand) else transforms((,newability[Choice name(back to library) target(<1>*|reveal) moveto(mylibrary)],newability[Choice name(put into Graveyard) target(<1>*|reveal) moveto(myGraveyard)])) optiontwoend revealend limit:1 # Treasure token, Set XLN -#AUTO_DEFINE _TREASURE_ create(Treasure:Artifact Treasure:0/0:"{T}, Sacrifice this artifact: Add one mana of any color.") and!( transforms((,newability[{T}{S}:Add{W}],newability[{T}{S}:Add{U}],newability[{T}{S}:Add{R}],newability[{T}{S}:Add{B}],newability[{T}{S}:Add{G}])) forever )! +#AUTO_DEFINE _TREASURE_ token(Treasure Sur) # Historic #AUTO_DEFINE _HISTORIC_ notAtarget(*[artifact;saga;legendary]|myZones) diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index e5ac68106..cf64948f3 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -212,12 +212,12 @@ toughness=2 [/card] [card] name=Academy Manufactor -auto=@tokencreated(food|myBattlefield):token(Clue,Artifact Clue,0/0,notrigger) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller -auto=@tokencreated(food|myBattlefield):token(Treasure,Artifact Treasure,0/0,notrigger) and!( transforms((,newability[{T}{S}:add{W}],newability[{T}{S}:add{U}],newability[{T}{S}:add{G}],newability[{T}{S}:add{B}],newability[{T}{S}:add{R}])) forever )! controller -auto=@tokencreated(clue|myBattlefield):token(Food,Artifact Food,0/0,notrigger) and!( transforms((,newability[{2}{T}{S}:life:3])) forever )! controller -auto=@tokencreated(clue|myBattlefield):token(Treasure,Artifact Treasure,0/0,notrigger) and!( transforms((,newability[{T}{S}:add{W}],newability[{T}{S}:add{U}],newability[{T}{S}:add{G}],newability[{T}{S}:add{B}],newability[{T}{S}:add{R}])) forever )! controller -auto=@tokencreated(treasure|myBattlefield):token(Food,Artifact Food,0/0,notrigger) and!( transforms((,newability[{2}{T}{S}:life:3])) forever )! controller -auto=@tokencreated(treasure|myBattlefield):token(Clue,Artifact Clue,0/0,notrigger) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@tokencreated(food|myBattlefield):token(Clue,notrigger) +auto=@tokencreated(food|myBattlefield):token(Treasure Sur,notrigger) +auto=@tokencreated(clue|myBattlefield):token(Food,notrigger) +auto=@tokencreated(clue|myBattlefield):token(Treasure Sur,notrigger) +auto=@tokencreated(treasure|myBattlefield):token(Food,notrigger) +auto=@tokencreated(treasure|myBattlefield):token(Clue,notrigger) text=If you would create a Clue, Food, or Treasure token, instead create one of each. mana={3} type=Artifact Creature @@ -2773,7 +2773,7 @@ toughness=2 [card] name=Archon of Coronation abilities=flying -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=this(variable{pmonarch}>0) preventalldamage to(controller) text=Flying -- When Archon of Coronation enters the battlefield, you become the monarch. -- As long as you're the monarch, damage doesn't cause you to lose life. (When a creature deals combat damage to you, its controller still becomes the monarch.) mana={4}{W}{W} @@ -4207,7 +4207,7 @@ toughness=3 [/card] [card] name=Azure Fleet Admiral -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=this(variable{omonarch}>0) unblockable text=When Azure Fleet Admiral enters the battlefield, you become the monarch. -- Azure Fleet Admiral can't be blocked by creatures the monarch controls. mana={3}{U} @@ -4307,7 +4307,7 @@ toughness=4 name=Bake into a Pie target=creature auto=destroy -auto=token(-473141) +auto=token(Food) text=Destroy target creature. Create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={2}{B}{B} type=Instant @@ -4689,8 +4689,8 @@ toughness=3 [/card] [card] name=Bartered Cow -auto=_DIES_token(-473141) -auto=@movedTo(this|mygraveyard) from(myHand):token(-473141) +auto=_DIES_token(Food) +auto=@movedTo(this|mygraveyard) from(myHand):token(Food) text=When Bartered Cow dies or when you discard it, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={3}{W} type=Creature @@ -5062,8 +5062,8 @@ subtype=Equipment name=Bearer of Overwhelming Truths abilities=prowess auto=@movedTo(*[-creature]|mystack):1/1 ueot -auto=@combatdamagefoeof(player) from(this):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller -auto=@combatdamageof(player) from(this):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@combatdamagefoeof(player) from(this):name(Create clue) token(Clue) controller +auto=@combatdamageof(player) from(this):name(Create clue) token(Clue) controller text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever Bearer of Overwhelming Truths deals combat damage to a player, investigate. (Create a colorless Clue artifact token with “{2}, Sacrifice this artifact: Draw a card.”) type=Creature subtype=Human Wizard @@ -6753,7 +6753,7 @@ type=Instant [/card] [card] name=Boar -auto=@movedto(this|ownergraveyard) from(battlefield):token(-473141) +auto=@movedto(this|ownergraveyard) from(battlefield):token(Food) text=When this creature dies, create a Food token. (A Food token is an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") type=Creature subtype=Boar @@ -7589,7 +7589,7 @@ toughness=1 [/card] [card] name=Brass's Bounty -auto=foreach(land|mybattlefield) token(Treasure,Artifact Treasure) and!( transforms((,newability[{T}{S}:Add{W}])(,newability[{T}{S}:Add{R}])(,newability[{T}{S}:Add{G}])(,newability[{T}{S}:Add{U}])(,newability[{T}{S}:Add{B}])) forever )! +auto=name(Create treasures) token(Treasure Sur)*type:land:myBattlefield text=For each land you control, create a Treasure token. (It’s an artifact with “{T}, Sacrifice this artifact: Add one mana of any color.”) mana={6}{R} type=Sorcery @@ -8596,7 +8596,7 @@ toughness=1 [/card] [card] name=Canal Courier -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! text=When Canal Courier enters the battlefield, you become the monarch. -- Whenever Canal Courier and another creature attack different players, Canal Courier can't be blocked this combat. mana={5}{U} type=Creature @@ -10779,6 +10779,11 @@ mana={3}{G} type=Sorcery [/card] [card] +name=City's_blessing +abilities=shroud,indestructible +type=City's_blessing +[/card] +[card] name=Citywatch Sphinx abilities=flying aicode=activate transforms((,newability[surveil],newability[all(*[zpos<=psurveiloffsetplus2plusend]|mylibrary) transforms((,newability[if compare(genrand2)~equalto~1 then moveto(mygraveyard)])) oneshot])) oneshot @@ -11253,6 +11258,12 @@ power=1 toughness=1 [/card] [card] +name=Clue +auto={S}{2}:name(Draw 1) draw:1 controller +text={2}, Sacrifice this artifact: Draw a card. +type=Artifact Clue +[/card] +[card] name=Coastline Chimera abilities=flying text=Flying -- {1}{W}: Coastline Chimera can block an additional creature this turn. @@ -12571,7 +12582,7 @@ toughness=1 [/card] [card] name=Court of Ambition -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each my upkeep restriction{compare(pmonarch)~equalto~0}:ability$!name(Choose one) choice name(Loose 3 life) life:-3 _ choice name(Discrd a card) reject notatarget(*|myhand)!$ opponent auto=@each my upkeep restriction{compare(pmonarch)~equalto~1}:ability$!name(Choose one) choice name(Loose 6 life) life:-6 _ choice name(Discrd 2 cards) reject notatarget(<2>*|myhand)!$ opponent text=When Court of Ambition enters the battlefield, you become the monarch. -- At the beginning of your upkeep, each opponent loses 3 life unless they discard a card. If you're the monarch, instead each opponent loses 6 life unless they discard two cards. @@ -12580,7 +12591,7 @@ type=Enchantment [/card] [card] name=Court of Bounty -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each my upkeep restriction{compare(pmonarch)~equalto~0}:may moveto(myBattlefield) target(land|myHand) auto=@each my upkeep restriction{compare(pmonarch)~equalto~1}:may moveto(myBattlefield) target(*[land;creature]|myHand) text=When Court of Bounty enters the battlefield, you become the monarch. -- At the beginning of your upkeep, you may put a land card from your hand onto the battlefield. If you're the monarch, instead you may put a creature or land card from your hand onto the battlefield. @@ -12589,7 +12600,7 @@ type=Enchantment [/card] [card] name=Court of Cunning -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each my upkeep restriction{compare(pmonarch)~equalto~0}:ability$!name(Choose one) choice name(Opponent mills cards) deplete:3 opponent _ choice name(You mill cards) deplete:3 controller _ choice name(Both player mill cards) deplete:3 controller && deplete:3 opponent _ choice name(No one mills cards) donothing!$ controller auto=@each my upkeep restriction{compare(pmonarch)~equalto~1}:ability$!name(Choose one) choice name(Opponent mills cards) deplete:10 opponent _ choice name(You mill cards) deplete:10 controller _ choice name(Both player mill cards) deplete:10 controller && deplete:10 opponent _ choice name(No one mills cards) donothing!$ controller text=When Court of Cunning enters the battlefield, you become the monarch. -- At the beginning of your upkeep, any number of target players each mill two cards. If you're the monarch, each of those players mills ten cards instead. (To mill a card, a player puts the top card of their library into their graveyard.) @@ -12598,7 +12609,7 @@ type=Enchantment [/card] [card] name=Court of Grace -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each my upkeep restriction{compare(pmonarch)~equalto~0}:token(Spirit,Creature Spirit,1/1,white,flying) auto=@each my upkeep restriction{compare(pmonarch)~equalto~1}:token(Angel,Creature Angel,4/4,white,flying) text=When Court of Grace enters the battlefield, you become the monarch. -- At the beginning of your upkeep, create a 1/1 white Spirit creature token with flying. If you're the monarch, create a 4/4 white Angel creature token with flying instead. @@ -12607,7 +12618,7 @@ type=Enchantment [/card] [card] name=Court of Ire -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each my upkeep restriction{compare(pmonarch)~equalto~0}:name(Deals 2 damages to any target) name(Deals 2 damages to any target) damage:2 target(player,creature,planeswalker) auto=@each my upkeep restriction{compare(pmonarch)~equalto~1}:name(Deals 7 damages to any target) name(Deals 7 damages to any target) damage:7 target(player,creature,planeswalker) text=When Court of Ire enters the battlefield, you become the monarch. -- At the beginning of your upkeep, Court of Ire deals 2 damage to any target. If you're the monarch, it deals 7 damage instead. @@ -12651,6 +12662,14 @@ mana={4}{B} type=Sorcery [/card] [card] +name=Crab +type=Creature +subtype=Crab +power=0 +toughness=3 +color=blue +[/card] +[card] name=Crack Open target=enchantment auto=destroy @@ -12921,7 +12940,7 @@ type=Sorcery [card] name=Crimson Fleet Commodore abilities=trample -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! text=Trample -- When Crimson Fleet Commodore enters the battlefield, you become the monarch. mana={3}{R} type=Creature @@ -13003,7 +13022,7 @@ subtype=Aura [/card] [card] name=Crown-Hunter Hireling -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=this(variable{omonarch}<1) cantattack auto=this(variable{omonarch}<1) cantpwattack text=When Crown-Hunter Hireling enters the battlefield, you become the monarch. -- Crown-Hunter Hireling can't attack unless defending player is the monarch. @@ -13483,7 +13502,7 @@ subtype=Aura name=Curious Pair // Treats to Share abilities=adventure other={G} name(Adventure) -autostack=if paid(alternative) then name(Create Food) name(Create Food) token(-473141) +autostack=if paid(alternative) then name(Create Food) name(Create Food) token(Food) autostack=if paid(alternative) then transforms((,newability[moveto(exile) and!( transforms((,newability[canplayfromexile])) forever )!])) forever text=Create a Food token. (Then exile this card. You may cast the creature later from exile. A Food token is an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={1}{G} @@ -13594,7 +13613,7 @@ type=Artifact [/card] [card] name=Custodi Lich -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@becomesmonarchof(player):target(player) ability$!name(sacrifice) target(creature|mybattlefield) sacrifice!$ targetedplayer text=When Custodi Lich enters the battlefield, you become the monarch. -- Whenever you become the monarch, target player sacrifices a creature. mana={3}{B}{B} @@ -14198,7 +14217,7 @@ toughness=4 [/card] [card] name=Dawnglade Regent -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=lord(*|myBattlefield) transforms((,newability[this(variable{pmonarch}>0) opponentshroud])) text=When Dawnglade Regent enters the battlefield, you become the monarch. -- As long as you're the monarch, permanents you control have hexproof. mana={5}{G}{G} @@ -15242,7 +15261,7 @@ type=Instant name=Depths of Desire target=creature auto=moveto(ownerhand) -auto=_TREASURE_ +auto=name(Create treasure) token(Treasure Sur) text=Return target creature to its owner's hand. Create a colorless Treasure artifact token with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." mana={2}{U} type=Instant @@ -15709,7 +15728,7 @@ type=Enchantment [card] name=Diabolical Salvation abilities=split second -auto=token(Devil,Creature Devil,4/4,red,unreath) with((,newability ((_DIES_token(Treasure,Artifact Treasure) and!( transforms((,newability[{T}{S}:Add{W}])(,newability[{T}{S}:Add{R}])(,newability[{T}{S}:Add{G}])(,newability[{T}{S}:Add{U}])(,newability[{T}{S}:Add{B}])) forever )!)) +auto=name(Create devil) token(Devil,Creature Devil,4/4,red,unreath) and!( transforms((,newability[_DIES_token(Treasure Sur)])) forever )! text=Split second Create four 4/4 red Devil creature tokens with haste and “When this creature dies, create a colorless Treasure artifact token with ‘{T}, Sacrifice this artifact: Add one mana of any color.’” Sacrifice the Devil tokens at the beginning of the next end step. mana={2}{R}{R}{R}{R} type=Instant @@ -18901,7 +18920,7 @@ toughness=5 [/card] [card] name=Emberwilde Captain -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each blockers restriction{type(creature[attacking]|opponentbattlefield)~morethan~0}:if compare(pmonarch)~morethan~0 then damage:type:*:opponenthand opponent text=When Emberwilde Captain enters the battlefield, you become the monarch. -- Whenever an opponent attacks you while you're the monarch, Emberwilde Captain deals damage to that player equal to the number of cards in their hand. mana={3}{R} @@ -19397,7 +19416,7 @@ type=Instant [/card] [card] name=Entourage of Trest -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! text=When Entourage of Trest enters the battlefield, you become the monarch. -- Entourage of Trest can block an additional creature each combat as long as you're the monarch. mana={4}{G} type=Creature @@ -20652,9 +20671,9 @@ type=Sorcery [/card] [card] name=Fae Offering -auto=@each my end restriction{thisturn(*[-creature]|mystack)~morethan~0,thisturn(*[creature]|mystack)~morethan~0}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller -auto=@each my end restriction{thisturn(*[-creature]|mystack)~morethan~0,thisturn(*[creature]|mystack)~morethan~0}:token(Food,Artifact Food,0/0) and!( transforms((,newability[{2}{T}{S}:life:3])) forever )! controller -auto=@each my end restriction{thisturn(*[-creature]|mystack)~morethan~0,thisturn(*[creature]|mystack)~morethan~0}:token(Treasure Sur) +auto=@each my end restriction{thisturn(*[-creature]|mystack)~morethan~0,thisturn(*[creature]|mystack)~morethan~0}:name(Create clue) token(Clue) +auto=@each my end restriction{thisturn(*[-creature]|mystack)~morethan~0,thisturn(*[creature]|mystack)~morethan~0}:name(Create food) token(Food) +auto=@each my end restriction{thisturn(*[-creature]|mystack)~morethan~0,thisturn(*[creature]|mystack)~morethan~0}:name(Create treasure) token(Treasure Sur) text=At the beginning of each end step, if you've cast both a creature spell and a noncreature spell this turn, create a Clue token, a Food token, and a Treasure token. mana={2}{G} type=Enchantment @@ -21201,7 +21220,7 @@ type=Enchantment [/card] [card] name=Feast of Succession -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=all(creature|battlefield) -4/-4 ueot text=All creatures get -4/-4 until end of turn. You become the monarch. mana={4}{B}{B} @@ -21229,7 +21248,7 @@ toughness=3 [card] name=Feasting Troll King auto=vigilance,trample -auto=if casted(this) then token(-473141) +auto=if casted(this) then token(Food) text=Vigilance, trample -- When Feasting Troll King enters the battlefield, if you cast it from your hand, create three Food tokens. (They're artifacts with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- Sacrifice three Foods: Return Feasting Troll King from your graveyard to the battlefield. Activate this ability only during your turn. mana={2}{G}{G}{G}{G} type=Creature @@ -21405,7 +21424,7 @@ type=Sorcery name=Fell the Pheasant target=creature[flying] auto=damage:5 -auto=token(-473141) +auto=token(Food) text=Fell the Pheasant deals 5 damage to target creature with flying. Create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={1}{G} type=Instant @@ -21739,7 +21758,7 @@ type=Instant [card] name=Fierce Witchstalker abilities=trample -auto=token(-473141) +auto=token(Food) text=Trample -- When Fierce Witchstalker enters the battlefield, create a Food token. (It's an artifact with "{2} , {T}, Sacrifice this artifact: You gain 3 life.") mana={2}{G}{G} type=Creature @@ -22731,7 +22750,7 @@ type=Sorcery [/card] [card] name=Floodhound -auto={3}{T}:name(Investigate) token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto={3}{T}:name(Investigate) name(Create clue) token(Clue) controller text={3}, {T}: Investigate. (Create a colorless Clue artifact token with "{2}, Sacrifice this artifact: Draw a card.") mana={U} type=Creature @@ -23020,7 +23039,7 @@ subtype=Equipment name=Foreboding Fruit target=player auto=draw:2 && life:-2 -auto=if casted(this) then if spent({B}{B}{B}) then token(-473141) controller +auto=if casted(this) then if spent({B}{B}{B}) then token(Food) controller text=Target player draws two cards and loses 2 life. -- Adamant — If at least three black mana was spent to cast this spell, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={2}{B} type=Sorcery @@ -23197,7 +23216,7 @@ type=Instant [card] name=Fortifying Provisions auto=lord(creature|myBattlefield) 0/1 -auto=token(-473141) +auto=token(Food) text=Creatures you control get +0/+1. -- When Fortifying Provisions enters the battlefield, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={2}{W} type=Enchantment @@ -23778,7 +23797,7 @@ type=Instant [card] name=Funnel-Web Recluse abilities=reach -auto=if morbid then token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=if morbid then name(Create clue) token(Clue) controller text=Reach -- Morbid — When Funnel-Web Recluse enters the battlefield, if a creature died this turn, investigate. (Create a colorless Clue artifact token with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{G} type=Creature @@ -24818,7 +24837,7 @@ name=Giant Opportunity target=creature other={2}{G}{S(food|myBattlefield)}{S(food|myBattlefield)} name(Sacrifice Foods) auto=if paid(alternative) then token(Giant,creature Giant,7/7,green) -auto=ifnot paid(alternative) then token(-473141)*3 +auto=ifnot paid(alternative) then token(Food)*3 text=You may sacrifice two Foods. If you do, create a 7/7 green Giant creature token. Otherwise, create three Food tokens. (They're artifacts with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={2}{G} type=Sorcery @@ -24882,7 +24901,7 @@ subtype=Aura name=Giant's Skewer auto={3}:equip auto=teach(creature) 2/1 -auto=teach(creature) transforms((,newability[@combatdamaged(creature) from(this):token(-473141)])) +auto=teach(creature) transforms((,newability[@combatdamaged(creature) from(this):token(Food)])) text=Equipped creature gets +2/+1. -- Whenever equipped creature deals combat damage to a creature, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- Equip {3} ({3}: Attach to target creature you control. Equip only as a sorcery.) mana={1}{B} type=Artifact @@ -25045,8 +25064,8 @@ toughness=4 [card] name=Gilded Goose abilities=flying -auto=token(-473141) -auto={1}{G}{T}:token(-473141) +auto=token(Food) +auto={1}{G}{T}:token(Food) auto={T}{S(food|myBattlefield)}:add{W} auto={T}{S(food|myBattlefield)}:add{U} auto={T}{S(food|myBattlefield)}:add{R} @@ -25120,7 +25139,7 @@ toughness=1 [card] name=Gingerbread Cabin auto=aslongas(other land[forest]|myBattlefield) tap(noevent) <3 oneshot -auto=aslongas(other land[forest]|myBattlefield) >2 token(-473141) once +auto=aslongas(other land[forest]|myBattlefield) >2 token(Food) once text={T}: Add {G}. -- Gingerbread Cabin enters the battlefield tapped unless you control three or more other Forests. -- When Gingerbread Cabin enters the battlefield untapped, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") type=Land subtype=Forest @@ -25642,7 +25661,7 @@ toughness=3 [card] name=Gluttonous Troll abilities=trample -auto=token(-473141) +auto=token(Food) auto={1}{G}{S(other *[-land]|mybattlefield)}:+2/+2 ueot text=Trample -- When Gluttonous Troll enters the battlefield, create a number of Food tokens equal to the number of opponents you have. (Food tokens are artifacts with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- {1}{G}, Sacrifice another nonland permanent: Gluttonous Troll gets +2/+2 until end of turn. mana={2}{B}{G} @@ -26341,7 +26360,7 @@ type=Land [card] name=Golden Demise auto=_ASCEND_ -auto=if type(*[city's_blessing]|mybattlefield)~equalto~0 then all(creature|myBattlefield) -2/-2 ueot +auto=if type(*[City's_blessing]|mybattlefield)~equalto~0 then all(creature|myBattlefield) -2/-2 ueot auto=all(creature|opponentBattlefield) -2/-2 ueot text=Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) -- All creatures get -2/-2 until end of turn. If you have the city's blessing, instead only creatures your opponents control get -2/-2 until end of turn. mana={1}{B}{B} @@ -27822,26 +27841,26 @@ toughness=3 [card] name=Gyome, Master Chef abilities=trample -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~1}:token(-473141) -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~2}:token(-473141)*2 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~3}:token(-473141)*3 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~4}:token(-473141)*4 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~5}:token(-473141)*5 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~6}:token(-473141)*6 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~7}:token(-473141)*7 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~8}:token(-473141)*8 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~9}:token(-473141)*9 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~10}:token(-473141)*10 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~11}:token(-473141)*11 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~12}:token(-473141)*12 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~13}:token(-473141)*13 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~14}:token(-473141)*14 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~15}:token(-473141)*15 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~16}:token(-473141)*16 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~17}:token(-473141)*17 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~18}:token(-473141)*18 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~19}:token(-473141)*19 -auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~morethan~19}:token(-473141)*20 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~1}:token(Food) +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~2}:token(Food)*2 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~3}:token(Food)*3 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~4}:token(Food)*4 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~5}:token(Food)*5 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~6}:token(Food)*6 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~7}:token(Food)*7 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~8}:token(Food)*8 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~9}:token(Food)*9 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~10}:token(Food)*10 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~11}:token(Food)*11 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~12}:token(Food)*12 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~13}:token(Food)*13 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~14}:token(Food)*14 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~15}:token(Food)*15 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~16}:token(Food)*16 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~17}:token(Food)*17 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~18}:token(Food)*18 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~equalto~19}:token(Food)*19 +auto=@each my end restriction{thisturn(creature[-token]|mybattlefield)~morethan~19}:token(Food)*20 auto={1}{S(food|mybattlefield)}:name(Creature gains indestructible) target(creature|battlefield) transforms((,newability[indestructible],newability[tap])) ueot text=Trample -- At the beginning of your end step, create a number of Food tokens equal to the number of nontoken creatures you had enter the battlefield under your control this turn. -- {1}, Sacrifice a Food: Target creature gains indestructible until end of turn. Tap it. mana={2}{B}{G} @@ -28343,8 +28362,8 @@ subtype=Aura [/card] [card] name=Hard Evidence -auto=token(Crab,Creature Crab,0/3,blue) -auto=token(Clue,Artifact Clue,0/0)*2 and!( transforms((,newability[{S}{2}:draw:1])) forever )! +auto=name(Create crab) token(Crab) +auto=name(Create clues) token(Clue)*2 text=Create a 0/3 blue Crab creature token. -- Investigate. (Create a colorless Clue artifact token with "{2} , Sacrifice this artifact: Draw a card.") mana={U} type=Sorcery @@ -32988,7 +33007,7 @@ type=Artifact [/card] [card] name=Jared Carthalion, True Heir -auto=becomesmonarch opponent +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) opponent else all(Monarch Token|battlefield) moveto(opponentbattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=this(variable{pmonarch}>0) vigor text=When Jared Carthalion, True Heir enters the battlefield, target opponent becomes the monarch. You can't become the monarch this turn. -- If damage would be dealt to Jared Carthalion while you're the monarch, prevent that damage and put that many +1/+1 counters on it. mana={R}{G}{W} @@ -34077,7 +34096,7 @@ toughness=5 [/card] [card] name=Keeper of Keys -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each my upkeep restriction{compare(pmonarch)~morethan~0}:lord(creature|mybattlefield) unblockable text=When Keeper of Keys enters the battlefield, you become the monarch. -- At the beginning of your upkeep, if you're the monarch, creatures you control can't be blocked this turn. mana={3}{U}{U} @@ -35008,7 +35027,7 @@ toughness=2 [/card] [card] name=Knights of the Black Rose -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@becomesmonarchfoeof(player):life:-2 opponent && life:2 controller text=When Knights of the Black Rose enters the battlefield, you become the monarch. -- Whenever an opponent becomes the monarch, if you were the monarch as the turn began, that player loses 2 life and you gain 2 life. mana={3}{W}{B} @@ -35554,7 +35573,7 @@ name=Kumena's Awakening auto=_ASCEND_ auto=@movedTo(*|myBattlefield):_ASCEND_ auto=@each my upkeep:draw:1 controller -auto=@each my upkeep restriction{type(*[city's_blessing]|mybattlefield)~equalto~0}:draw:1 opponent +auto=@each my upkeep restriction{type(*[City's_blessing]|mybattlefield)~equalto~0}:draw:1 opponent text=Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) -- At the beginning of your upkeep, each player draws a card. If you have the city's blessing, instead only you draw a card. mana={2}{U}{U} type=Enchantment @@ -35851,7 +35870,7 @@ type=Instant name=Late to Dinner target=creature|mygraveyard auto=moveto(myBattlefield) -auto=token(Food,Artifact Food,0/0) and!( transforms((,newability[{2}{T}{S}:life:3])) forever )! +auto=name(Create food) token(Food) text=Return target creature card from your graveyard to the battlefield. Create a Food token. (It's an artifact with " 2 , {T}, Sacrifice this artifact: You gain 3 life.") mana={3}{W} type=Sorcery @@ -37445,7 +37464,7 @@ toughness=1 [card] name=Lonis, Cryptozoologist aicode=activate target(*[-land;zpos<=1]|opponentlibrary) moveto(myBattlefield) -auto=@movedTo(other creature[-token]|mybattlefield):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! +auto=@movedTo(other creature[-token]|mybattlefield):name(Create clue) token(Clue) auto={T}{S(clue[token]|myBattlefield)}:name(Sacrifice 1 clue) reveal:1 revealzone(opponentlibrary) optionone target(*|reveal) moveto(myBattlefield) optiononeend optiontwo target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend auto={T}{S(clue[token]|myBattlefield)}{S(clue[token]|myBattlefield)}:name(Sacrifice 2 clues) reveal:2 revealzone(opponentlibrary) optionone target(*|reveal) moveto(myBattlefield) optiononeend optiontwo target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend auto={T}{S(clue[token]|myBattlefield)}{S(clue[token]|myBattlefield)}{S(clue[token]|myBattlefield)}:name(Sacrifice 3 clues) reveal:3 revealzone(opponentlibrary) optionone target(*|reveal) moveto(myBattlefield) optiononeend optiontwo target(*|reveal) bottomoflibrary and!( all(*|reveal) bottomoflibrary )! optiontwoend revealend @@ -38908,7 +38927,7 @@ type=Instant [/card] [card] name=Marchesa's Decree -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each blockers:foreach(creature[attacking]|opponentBattlefield) life:-1 opponent text=When Marchesa's Decree enters the battlefield, you become the monarch. -- Whenever a creature attacks you or a planeswalker you control, that creature's controller loses 1 life. mana={3}{B} @@ -39299,7 +39318,7 @@ name=Mausoleum Harpy abilities=flying auto=_ASCEND_ auto=@movedTo(*|myBattlefield):_ASCEND_ -auto=@movedto(other creature|mygraveyard) from(battlefield) restriction{type(*[city's_blessing]|mybattlefield)~morethan~0}:counter(1/1) +auto=@movedto(other creature|mygraveyard) from(battlefield) restriction{type(*[City's_blessing]|mybattlefield)~morethan~0}:counter(1/1) text=Flying -- Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) -- Whenever another creature you control dies, if you have the city's blessing, put a +1/+1 counter on Mausoleum Harpy. mana={4}{B} type=Creature @@ -40716,6 +40735,14 @@ power=3 toughness=3 [/card] [card] +name=Monarch Token +abilities=shroud,indestructible +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! +auto=@each my endofturn restriction{compare(pmonarch)~morethan~0}:name(Monarch draw a card) draw:1 controller +auto=@combatdamageof(player) restriction{compare(pmonarch)~morethan~0}:name(Opponent becomes monarch) moveto(opponentBattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! +type=MonarchToken +[/card] +[card] name=Monk Class auto=counter(0/0,1,Level) auto=if thisturn(*|mystack)~equalto~1 then counter(0/0,1,MonkEffect) @@ -44199,7 +44226,7 @@ toughness=4 name=Orazca Relic auto=_ASCEND_ auto=@movedTo(*|myBattlefield):_ASCEND_ -auto=_CITY'S_BLESSING_ transforms((,newability[{T}{S}:life:3 && draw:1])) +auto=_CITY'S_BLESSING_ transforms((,newability[{T}{S}:name(Gain life and draw) life:3 && draw:1])) auto={T}:Add{C} text=Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) -- {T}: Add {C}. -- {T}, Sacrifice Orazca Relic: You gain 3 life and draw a card. Activate this ability only if you have the city's blessing. mana={3} @@ -44227,7 +44254,7 @@ type=Artifact name=Orchard Strider aicode=activate target(land[basic]|mylibrary) moveto(myhand) autohand={1}{G}{cycle}:name(search card) Reveal:type:*:mylibrary revealzone(mylibrary) optionone name(choose card) target(<1>land[basic]|reveal) transforms((,newability[all(other *|reveal) moveto(mylibrary) and!(shuffle)!],newability[moveto(myhand)])) optiononeend optiontwo name(shuffle) bottomoflibrary target(<1>*|reveal) and!( all(*|reveal) bottomoflibrary and!(shuffle)! )! optiontwoend revealend -auto=token(Food,Artifact Food,0/0) and!( transforms((,newability[{2}{T}{S}:life:3])) forever )! +auto=name(Create food) token(Food) text=When Orchard Strider enters the battlefield, create two Food tokens. (They're artifacts with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- Basic landcycling {1}{G} ({1}{G}, Discard this card: Search your library for a basic land card, reveal it, put it into your hand, then shuffle.) mana={4}{G}{G} type=Creature @@ -44956,9 +44983,8 @@ toughness=4 [/card] [card] name=Palace Jailer -auto=becomesmonarch controller -auto=moveto(opponentexile) target(creature|opponentbattlefield) -auto=@becomesmonarchfoeof(player) once:moveto(ownerbattlefield) target(creature|opponentexile) +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! +auto=name(Exile creature) target(creature|opponentbattlefield) moveto(opponentexile) and!( transforms((,newability[@becomesmonarchof(player):name(Return to battlefield) moveto(ownerbattlefield)])) forever )! text=When Palace Jailer enters the battlefield, you become the monarch. -- When Palace Jailer enters the battlefield, exile target creature an opponent controls until an opponent becomes the monarch. (That creature returns under its owner's control.) mana={2}{W}{W} type=Creature @@ -44968,7 +44994,7 @@ toughness=2 [/card] [card] name=Palace Sentinels -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! text=When Palace Sentinels enters the battlefield, you become the monarch. mana={3}{W} type=Creature @@ -47516,7 +47542,7 @@ type=Enchantment [card] name=Protector of the Crown abilities=cantlifelose -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@damageof(player):life:thatmuch controller && damage:thatmuch all(this) text=When Protector of the Crown enters the battlefield, you become the monarch. -- All damage that would be dealt to you is dealt to Protector of the Crown instead. mana={5}{W} @@ -48160,7 +48186,7 @@ type=Sorcery [card] name=Queen Marchesa abilities=deathtouch,haste -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each my upkeep restriction{compare(omonarch)~morethan~0}:token(Assassin,Creature Assassin,1/1,black,deathtouch,haste) text=Deathtouch, haste -- When Queen Marchesa enters the battlefield, you become the monarch. -- At the beginning of your upkeep, if an opponent is the monarch, put a 1/1 black Assassin creature token with deathtouch and haste onto the battlefield. mana={1}{R}{W}{B} @@ -49719,7 +49745,7 @@ type=Instant [card] name=Regal Behemoth abilities=trample -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=lord(land|myBattlefield) transforms((,newability[this(variable{pmonarch}>0) produceextra:selectmana])) text=Trample -- When Regal Behemoth enters the battlefield, you become the monarch. -- Whenever you tap a land for mana while you're the monarch, add one mana of any color to your mana pool (in addition to the mana the land produces). mana={4}{G}{G} @@ -53522,8 +53548,8 @@ subtype=Aura [/card] [card] name=Savvy Hunter -auto=_ATTACKING_token(-473141) -auto=@combat(blocking) source(this):token(-473141) +auto=_ATTACKING_token(Food) +auto=@combat(blocking) source(this):token(Food) auto={S(food|myBattlefield)}{S(food|myBattlefield)}:draw:1 text=Whenever Savvy Hunter attacks or blocks, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- Sacrifice two Foods: Draw a card. mana={1}{B}{G} @@ -54139,7 +54165,7 @@ toughness=6 [/card] [card] name=Scuttletide -auto={1}{D(*|myhand)}:token(Crab,Creature Crab,0/3,blue) +auto={1}{D(*|myhand)}:name(Create crab) token(Crab) auto=this(variable{mygravecardtypes}>3) lord(crab|myBattlefield) 1/1 text={1}, Discard a card: Create a 0/3 blue Crab creature token. -- Delirium — Crabs you control get +1/+1 as long as there are four or more card types among cards in your graveyard. mana={1}{U} @@ -54318,7 +54344,7 @@ type=Snow Sorcery [/card] [card] name=Search the Premises -auto=@each blockers:name(Investigate) token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@each blockers:name(Investigate) name(Create clue) token(Clue) controller text=Whenever a creature attacks you or a planeswalker you control, investigate. (Create a colorless Clue artifact token with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{W} type=Enchantment @@ -57516,7 +57542,7 @@ toughness=2 [card] name=Skyline Despot abilities=flying -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! auto=@each my upkeep restriction{compare(pmonarch)~morethan~0}:token(Dragon,Creature Dragon,5/5,red,flying) text=Flying -- When Skyline Despot enters the battlefield, you become the monarch. -- At the beginning of your upkeep, if you're the monarch, put a 5/5 red Dragon creature token with flying onto the battlefield. mana={5}{R}{R} @@ -59070,7 +59096,7 @@ toughness=3 [card] name=Specimen Collector auto=token(Squirrel,Creature Squirrel,1/1,green) -auto=token(Crab,Creature Crab,0/3,blue) +auto=name(Create crab) token(Crab) auto=_DIES_name(Copy token) clone target(*[token]|mybattlefield) text=When Specimen Collector enters the battlefield, create a 1/1 green Squirrel creature token and a 0/3 blue Crab creature token. -- When Specimen Collector dies, create a token that's a copy of target token you control. mana={4}{U} @@ -60246,6 +60272,14 @@ type=Enchantment subtype=Aura [/card] [card] +name=Squirrel +type=Creature +subtype=Squirrel +power=1 +toughness=1 +color=green +[/card] +[card] name=Squirrel Sanctuary auto=token(Squirrel,Creature Squirrel,1/1,green) auto=@movedto(graveyard) from(creature[-token]|myBattlefield):may pay({1}) name(Pay 1 and return to hand) moveTo(ownerhand) @@ -60516,7 +60550,7 @@ toughness=3 [card] name=Staunch Throneguard abilities=vigilance -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! text=Vigilance -- When Staunch Throneguard enters the battlefield, you become the monarch. mana={5} type=Artifact Creature @@ -62473,8 +62507,8 @@ type=Enchantment [/card] [card] name=Sylvan Offering -auto=token(Treefolk,Creature Treefolk,X/X,green,tnum:2) opponent -auto=token(Treefolk,Creature Treefolk,X/X,green,tnum:2) controller +auto=token(Treefolk,Creature Treefolk,X/X,green,tnum.2) opponent +auto=token(Treefolk,Creature Treefolk,X/X,green,tnum.2) controller auto=token(Elf Warrior,Creature Elf Warrior,1/1,green)*X opponent auto=token(Elf Warrior,Creature Elf Warrior,1/1,green)*X controller text=Choose an opponent. You and that player each put an X/X green Treefolk creature token onto the battlefield. -- Choose an opponent. You and that player each put X 1/1 green Elf Warrior creature tokens onto the battlefield. @@ -63138,7 +63172,7 @@ type=Enchantment name=Taste of Death auto=sacrifice notatarget(<3>creature|mybattlefield) auto=ability$! sacrifice notatarget(<3>creature|mybattlefield) !$ opponent -auto=token(-473141)*3 +auto=token(Food)*3 text=Each player sacrifices three creatures. You create three Food tokens. (They're artifacts with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={4}{B}{B} type=Sorcery @@ -63500,7 +63534,7 @@ type=Artifact [/card] [card] name=Tempting Witch -auto=token(-473141) +auto=token(Food) auto={2}{T}{S(food|myBattlefield)}:life:-3 target(player) text=When Tempting Witch enters the battlefield, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- {2}, {T}, Sacrifice a Food: Target player loses 3 life. mana={2}{B} @@ -64484,7 +64518,7 @@ subtype=Saga [/card] [card] name=The Underworld Cookbook -auto={T}{D(*|myHand)}:name(Create food) token(Food,Artifact Food,0/0) and!( transforms((,newability[{2}{T}{S}:life:3])) forever )! controller +auto={T}{D(*|myHand)}:name(Create food) token(Food) auto={4}{T}{S}:name(Return creature) target(creature|mygraveyard) moveto(myHand) text={T}, Discard a card: Create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- {4}, {T}, Sacrifice The Underworld Cookbook: Return target creature card from your graveyard to your hand. mana={1} @@ -64648,7 +64682,7 @@ toughness=6 [card] name=Thorn of the Black Rose abilities=deathtouch -auto=becomesmonarch controller +auto=if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! text=Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) -- When Thorn of the Black Rose enters the battlefield, you become the monarch. mana={3}{B} type=Creature @@ -64714,7 +64748,7 @@ toughness=2 [/card] [card] name=Thorough Investigation -auto=@each my blockers:name(Investigation) token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@each my blockers:name(Investigation) name(Create clue) token(Clue) controller auto=@sacrificed(Clue|mybattlefield) restriction{compare(type:*[nodngplr]:mybattlefieldplustype:*[nodngopp]:opponentbattlefieldplusend)~equalto~0}:name(Venture into dungeon) transforms((,newability[if type(*[dungeon]|mycommandzone)~morethan~0 then name(Explore the dungeon) name(Explore the dungeon) all(*[dungeon]|mycommandzone) counter(0/0.1.Explore)],newability[if type(*[dungeon]|mycommandzone)~equalto~0 then name(Choose a new dungeon) name(Choose a new dungeon) target(*[dungeon]|mysideboard) moveTo(mycommandzone) and!( counter(0/0.1.Explore) )!])) oneshot text=Whenever you attack, investigate. (Create a colorless Clue artifact token with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, venture into the dungeon. (Enter the first room or advance to the next room.) mana={2}{W} @@ -65043,7 +65077,7 @@ type=Legendary Artifact [card] name=Throne of the High City auto={T}:add{C} -auto={4}{T}{S}:becomesmonarch controller +auto={4}{T}{S}:if type(Monarch Token|battlefield)~lessthan~1 then token(Monarch Token) else all(Monarch Token|battlefield) moveto(mybattlefield) and!( transforms((,newability[becomesmonarch controller])) forever )! text={T}: Add {C} to your mana pool. -- {4}, {T}, Sacrifice Throne of the High City: You become the monarch. type=Land [/card] @@ -65394,7 +65428,7 @@ toughness=1 [card] name=Tilonalli's Summoner auto=_ASCEND_ -auto=@movedTo(*|myBattlefield) restriction{type(*[city's_blessing]|mybattlefield)~equalto~0}:_ASCEND_ +auto=@movedTo(*|myBattlefield) restriction{type(*[City's_blessing]|mybattlefield)~equalto~0}:_ASCEND_ auto=_ATTACKING_may pay({X}{R}) name(Create X elemental tokens) token(Elemental,Creature Elemental Tilonalli,1/1,red,battleready)*x auto=@each my endstep restriction{type(*[city's_blessing]|mybattlefield)~equalto~0}:moveto(exile) all(Tilonalli[token;fresh]|myBattlefield) text=Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) -- Whenever Tilonalli's Summoner attacks, you may pay {X}{R}. If you do, create X 1/1 red Elemental creature tokens that are tapped and attacking. At the beginning of the next end step, exile those tokens unless you have the city's blessing. @@ -66268,7 +66302,7 @@ type=Instant [/card] [card] name=Trail of Crumbs -auto=token(-473141) +auto=token(Food) auto=@sacrificed(food|mybattlefield):pay({1}) name(look) reveal:2 optionone name(Get a permanent card) target(<1>*[-instant,-sorcery]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<2>*|reveal) bottomoflibrary optiontwoend revealend text=When Trail of Crumbs enters the battlefield, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- Whenever you sacrifice a Food, you may pay 1 . If you do, look at the top two cards of your library. You may reveal a permanent card from among them and put it into your hand. Put the rest on the bottom of your library in any order. mana={1}{G} @@ -66447,7 +66481,7 @@ type=Artifact Treasure name=Treasure Map aicode=activate transforms((,newability[all(*[zpos<=type:zombie:mybattlefield]|mylibrary) transforms((,newability[may name(Put on bottom of library) moveto(myreveal) and!( bottomoflibrary )!])) oneshot])) oneshot auto={1}{T}:_SCRY_(1) && counter(0/0,1,landmark) -auto=@counteradded(0/0,1,landmark) from(this):this(counter{0/0.3.landmark}=) removeallcounters(0/0.1.landmark) && flip(Treasure Cove) && _TREASURE_*3 +auto=@counteradded(0/0,1,landmark) from(this):this(counter{0/0.3.landmark}=) removeallcounters(0/0.1.landmark) && flip(Treasure Cove) && token(Treasure Sur)*3 text={1}, {T}: Scry 1. Put a landmark counter on Treasure Map. Then if there are three or more landmark counters on it, remove those counters, transform Treasure Map, and create three colorless Treasure artifact tokens with "{T}, Sacrifice this artifact: Add one mana of any color to your mana pool." mana={2} type=Artifact @@ -67029,7 +67063,7 @@ name=Turn into a Pumpkin target=*[-land] auto=moveto(ownerhand) auto=draw:1 controller -auto=if casted(this) then if spent({U}{U}{U}) then token(-473141) +auto=if casted(this) then if spent({U}{U}{U}) then token(Food) text=Return target nonland permanent to its owner's hand. Draw a card. -- Adamant — If at least three blue mana was spent to cast this spell, create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={3}{U} type=Instant @@ -67132,7 +67166,7 @@ name=Twilight Prophet abilities=flying auto=_ASCEND_ auto=@movedTo(*|myBattlefield):_ASCEND_ -auto=@each my upkeep restriction{type(*[city's_blessing]|mybattlefield)~morethan~0}:moveto(myhand) and!( transforms((,newability[damage:manacost opponent],newability[life:manacost controller])) ueot )! all(*[zpos=1]|mylibrary) +auto=@each my upkeep restriction{type(*[City's_blessing]|mybattlefield)~morethan~0}:moveto(myhand) and!( transforms((,newability[damage:manacost opponent],newability[life:manacost controller])) ueot )! all(*[zpos=1]|mylibrary) text=Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) -- At the beginning of your upkeep, if you have the city's blessing, reveal the top card of your library and put it into your hand. Each opponent loses X life and you gain X life, where X is that card's converted mana cost. mana={2}{B}{B} type=Creature @@ -70053,8 +70087,8 @@ toughness=3 [card] name=Vona's Hunger auto=_ASCEND_ -auto=if type(*[city's_blessing]|mybattlefield)~morethan~0 then ability$!name(sacrifice half creatures) notatarget(creature|myBattlefield) sacrifice!$ opponent -auto=if type(*[city's_blessing]|mybattlefield)~equalto~0 then ability$!name(sacrifice a creature) notatarget(creature|myBattlefield) sacrifice!$ opponent +auto=if type(*[City's_blessing]|mybattlefield)~morethan~0 then ability$!name(sacrifice half creatures) notatarget(creature|myBattlefield) sacrifice!$ opponent +auto=if type(*[City's_blessing]|mybattlefield)~equalto~0 then ability$!name(sacrifice a creature) notatarget(creature|myBattlefield) sacrifice!$ opponent text=Ascend (If you control ten or more permanents, you get the city's blessing for the rest of the game.) -- Each opponent sacrifices a creature. If you have the city's blessing, instead each opponent sacrifices half the creatures they control, rounded up. mana={2}{B} type=Instant @@ -70931,7 +70965,7 @@ name=Wavesifter abilities=flying other={G}{U} name(Evoke) auto=if paid(alternative) then sacrifice -auto=token(Clue,Artifact Clue,0/0)*2 and!( transforms((,newability[{S}{2}:draw:1])) forever )! +auto=name(Create clues) token(Clue)*2 text=Flying -- When Wavesifter enters the battlefield, investigate twice. (To investigate, create a colorless Clue artifact token with "{2}, Sacrifice this artifact: Draw a card.") -- Evoke {G}{U} (You may cast this spell for its evoke cost. If you do, it's sacrificed when it enters the battlefield.) mana={3}{G}{U} type=Creature @@ -71846,8 +71880,8 @@ subtype=Swamp [/card] [card] name=Witch's Oven -auto={T}{S(creature[toughness<4]|myBattlefield)}:token(-473141) -auto={T}{S(creature[toughness>=4]|myBattlefield)}:token(-473141)*2 +auto={T}{S(creature[toughness<4]|myBattlefield)}:token(Food) +auto={T}{S(creature[toughness>=4]|myBattlefield)}:token(Food)*2 text={T}, Sacrifice a creature: Create a Food token. If the sacrificed creature's toughness was 4 or greater, create two Food tokens instead. (They're artifacts with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") mana={1} type=Artifact @@ -72363,7 +72397,7 @@ toughness=1 [/card] [card] name=Xorn -auto=@tokencreated(treasure|myBattlefield):token(Treasure,Artifact Treasure,0/0,notrigger) and!( transforms((,newability[{T}{S}:add{W}],newability[{T}{S}:add{U}],newability[{T}{S}:add{G}],newability[{T}{S}:add{B}],newability[{T}{S}:add{R}])) forever )! controller +auto=@tokencreated(treasure|myBattlefield):token(Treasure Sur,notrigger) text=If you would create one or more Treasure tokens, instead create those tokens plus an additional Treasure token. mana={2}{R} type=Creature diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index f1f85b692..b84fa0ce4 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -16039,7 +16039,7 @@ type=Instant [card] name=Bygone Bishop abilities=flying -auto=@movedto(creature[manacost<=3]|mystack):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@movedto(creature[manacost<=3]|mystack):name(Create clue) token(Clue) controller text=Flying -- Whenever you cast a creature spell with converted mana cost 3 or less, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{W} type=Creature @@ -16049,7 +16049,7 @@ toughness=3 [/card] [card] name=Byway Courier -auto=_DIES_token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=_DIES_name(Create clue) token(Clue) controller text=When Byway Courier dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{G} type=Creature @@ -21803,7 +21803,7 @@ toughness=1 name=Confirm Suspicions target=*|mystack auto=fizzle -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )!*3 controller +auto=name(Create clue) token(Clue)*3 controller text=Counter target spell. -- Investigate three times. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{U}{U} type=Instant @@ -21820,7 +21820,7 @@ subtype=Aura [card] name=Confront the Unknown target=creature -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller auto=foreach(clue|mybattlefield) 1/1 text=Investigate, then target creature gets +1/+1 until end of turn for each Clue you control. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={G} @@ -27475,7 +27475,7 @@ type=Artifact [card] name=Declaration in Stone target=creature -auto=all(*[-token;share!name!]|targetcontrollerbattlefield) moveto(exile) and!( token(Clue,Artifact Clue,0/0) targetcontroller and!( transforms((,newability[{S}{2}:draw:1])) forever )! )! +auto=all(*[-token;share!name!]|targetcontrollerbattlefield) moveto(exile) and!( token(Clue) targetcontroller )! auto=all(*[token;share!name!]|targetcontrollerbattlefield) moveto(exile) text=Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way. mana={1}{W} @@ -32507,7 +32507,7 @@ toughness=7 [/card] [card] name=Drownyard Explorers -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=When Drownyard Explorers enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{U} type=Creature @@ -36610,7 +36610,7 @@ type=Legendary Enchantment [card] name=Erdwal Illuminator abilities=flying -auto=@movedto(clue|mybattlefield) turnlimited:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! +auto=@movedto(clue|mybattlefield) turnlimited:name(Create clue) token(Clue) text=Flying -- Whenever you investigate for the first time each turn, investigate an additional time. mana={1}{U} type=Creature @@ -37896,7 +37896,7 @@ type=Sorcery [card] name=Expose Evil auto=target(creature) tap(noevent) -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=Tap up to two target creatures. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{W} type=Instant @@ -41660,7 +41660,7 @@ toughness=1 [/card] [card] name=Fleeting Memories -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller auto=@sacrificed(clue|mybattlefield):target(player) deplete:3 text=When Fleeting Memories enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, target player puts the top three cards of his or her library into his or her graveyard. mana={2}{U} @@ -46432,7 +46432,7 @@ type=Artifact name=Gild target=creature auto=moveto(exile) -auto=token(-378445) controller +auto=token(Gold) controller text=Exile target creature. Put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool." mana={3}{B} type=Sorcery @@ -48946,7 +48946,7 @@ toughness=6 name=Gone Missing target=* auto=moveto(ownerlibrary) -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=Put target permanent on top of its owner's library. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{U} type=Sorcery @@ -56048,7 +56048,7 @@ toughness=1 name=Humble the Brute target=creature[power>3] auto=destroy -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=Destroy target creature with power 4 or greater. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{W} type=Instant @@ -59687,7 +59687,7 @@ type=Enchantment name=Jace's Scrutiny target=creature auto=-4/-0 -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=Target creature gets -4/-0 until end of turn. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} type=Instant @@ -62876,7 +62876,7 @@ toughness=5 [/card] [card] name=King Macar, the Gold-Cursed -auto=@untapped(this):may moveto(exile) target(creature) && token(-378445) controller +auto=@untapped(this):may moveto(exile) target(creature) && token(Gold) controller text=Inspired -- Whenever King Macar, the Gold-Cursed becomes untapped, you may exile target creature. If you do, put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool." mana={2}{B}{B} type=Legendary Creature @@ -69748,7 +69748,7 @@ type=Instant [card] name=Magnifying Glass auto={T}:Add{C} -auto={4}{T}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto={4}{T}:name(Create clue) token(Clue) controller text={T}: Add {C} to your mana pool. -- {4}, {T}: Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3} type=Artifact @@ -82207,8 +82207,8 @@ toughness=3 [/card] [card] name=Ongoing Investigation -auto=@each combatdamage restriction{opponentdamagedbycombat}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller -auto={1}{G}{e(creature|mygraveyard)}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller && life:2 +auto=@each combatdamage restriction{opponentdamagedbycombat}:name(Create clue) token(Clue) controller +auto={1}{G}{e(creature|mygraveyard)}:name(Create clue) token(Clue) controller && life:2 text=Whenever one or more creatures you control deal combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {1}{G}, Exile a creature card from your graveyard: Investigate. You gain 2 life. mana={1}{U} type=Enchantment @@ -88139,7 +88139,7 @@ type=Sorcery name=Press for Answers target=creature auto=freeze -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=Tap target creature. It doesn't untap during its controller's next untap step. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} type=Sorcery @@ -96565,7 +96565,7 @@ type=Enchantment name=Root Out target=artifact,enchantment auto=destroy -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=Destroy target artifact or enchantment. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{G} type=Sorcery @@ -112279,7 +112279,7 @@ subtype=Aura [/card] [card] name=Squirrel Wrangler -auto={1}{G}{S(land|myBattlefield)}:token(Squirrel,creature squirrel,1/1,green)*2 +auto={1}{G}{S(land|myBattlefield)}:token(Squirrel,Creature Squirrel,1/1,green)*2 auto={1}{G}{S(land|myBattlefield)}:all(squirrel) 1/1 ueot text={1}{G}, Sacrifice a land: Put two 1/1 green Squirrel creature tokens onto the battlefield. -- {1}{G}, Sacrifice a land: Squirrel creatures get +1/+1 until end of turn. mana={2}{G}{G} @@ -116161,7 +116161,7 @@ name=Survive the Night target=creature auto=1/0 auto=indestructible -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=Target creature gets +1/+0 and gains indestructible until end of turn. (Damage and effects that say "destroy" don't destroy it.) -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{W} type=Instant @@ -117658,7 +117658,7 @@ toughness=4 [card] name=Tamiyo's Journal abilities=hiddenface -auto=@each my upkeep:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! +auto=@each my upkeep:name(Create clue) token(Clue) aicode=activate target(*|mylibrary) moveto(myhand) auto={T}{S(clue|mybattlefield)}{S(clue|mybattlefield)}{S(clue|mybattlefield)}: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=At the beginning of your upkeep, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {T}, Sacrifice three Clues: Search your library for a card and put that card into your hand. Then shuffle your library. @@ -120580,7 +120580,7 @@ toughness=2 [/card] [card] name=Thraben Inspector -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller text=When Thraben Inspector enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={W} type=Creature @@ -121898,7 +121898,7 @@ toughness=3 [/card] [card] name=Tireless Tracker -auto=_LANDFALL_token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=_LANDFALL_name(Create clue) token(Clue) controller auto=@sacrificed(clue|mybattlefield):counter(1/1,1) text=Whenever a land enters the battlefield under your control, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker. mana={2}{G} @@ -123104,7 +123104,7 @@ type=Instant [/card] [card] name=Trail of Evidence -auto=@movedto(instant,sorcery|mystack):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@movedto(instant,sorcery|mystack):name(Create clue) token(Clue) controller text=Whenever you cast an instant or sorcery spell, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{U} type=Enchantment @@ -125336,7 +125336,7 @@ toughness=* [/card] [card] name=Ulvenwald Mysteries -auto=@movedto(creature[-token]|mygraveyard):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@movedto(creature[-token]|mygraveyard):name(Create clue) token(Clue) controller auto=@sacrificed(clue|mybattlefield):token(Human Soldier,creature Human Soldier,1/1,white) text=Whenever a nontoken creature you control dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a 1/1 white Human Soldier creature token onto the battlefield. mana={2}{G} @@ -132902,7 +132902,7 @@ toughness=1 [/card] [card] name=Weirding Wood -auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=name(Create clue) token(Clue) controller auto=teach(land) {T}:add{G}{G} auto=teach(land) {T}:add{W}{W} auto=teach(land) {T}:add{U}{U} diff --git a/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt b/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt index ff9131e04..89c2529c2 100644 --- a/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt +++ b/projects/mtg/bin/Res/sets/primitives/planeswalkers.txt @@ -2188,7 +2188,7 @@ subtype=Oko [card] name=Oko, Thief of Crowns auto=counter(0/0,4,loyalty) -auto={C(0/0,2,Loyalty)}:name(+2: Food) token(-473141) +auto={C(0/0,2,Loyalty)}:name(+2: Food) token(Food) auto={C(0/0,1,Loyalty)}:name(+1: Transform Artifact) target(artifact) loseabilities && transforms((,setpower=3,settoughness=3)) && transforms((Elk,green)) auto={C(0/0,-5,Loyalty)}:name(-5: Exchange) moveto(mybattlefield) target(creature[power<=3]|opponentbattlefield) && moveto(opponentbattlefield) target(*[creature;artifact]|mybattlefield) text=+2: Create a Food token. (It's an artifact with "{2}, {T}, Sacrifice this artifact: You gain 3 life.") -- +1: Target artifact or creature loses all abilities and becomes a green Elk creature with base power and toughness 3/3. -- -5: Exchange control of target artifact or creature you control and target creature an opponent controls with power 3 or less. diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 22d912962..d0d23ed1a 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -3028,7 +3028,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG starfound = starfound.substr(0,starEnd); multiplier = NEW WParsedInt(starfound, spell, card); } - + replace(splitToken[1].begin(), splitToken[1].end(), '^', ','); // To allow the usage of ^ instead of , char (e.g. using token keyword inside transforms) int tokenId = atoi(splitToken[1].c_str()); if (tokenId) { @@ -3047,19 +3047,25 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG } return tok; } - string tokenDesc = splitToken[1]; - replace(tokenDesc.begin(), tokenDesc.end(), '^', ','); // To allow the usage of ^ instead of , char (e.g. using token keyword inside transforms) vector tokenParameters = split(tokenDesc, ','); + string sabilities = ""; //lets try finding a token by card name. if (splitToken[1].size() && (tokenParameters.size() ==1||tokenParameters.size() ==2)) { string cardName = splitToken[1]; + size_t triggerpos = cardName.find(",notrigger"); + if(triggerpos != string::npos){ + cardName.replace(triggerpos, 10, ""); // To allow the usage of notrigger even with named token (e.g. Academy Manufactor) + sabilities = "notrigger"; + } MTGCard * safetycard = MTGCollection()->getCardByName(cardName); if (safetycard) //lets try constructing it then,we didnt find it by name { ATokenCreator * tok = NEW ATokenCreator(observer, id, card, target, NULL, cardName, starfound, multiplier, who); tok->oneShot = 1; + if(!sabilities.empty()) + tok->sabilities = sabilities; //andability if(storedAndAbility.size()) { @@ -3082,7 +3088,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG //reconstructing string abilities from the split version, // then we re-split it again in the token constructor, // this needs to be improved - string sabilities = (tokenParameters.size() > 3)? tokenParameters[3] : ""; + sabilities = (tokenParameters.size() > 3)? tokenParameters[3] : ""; for (size_t i = 4; i < tokenParameters.size(); ++i) { sabilities.append(",");