Improved AI: now it can cast spells from graveyard using thier Flashback and Retrace costs, fixed a crash in Deck Editor stats loader when a card ability contains some "add" substrings (e.g. "counteradded" followed by "restriction{"), added/fixed primitives.

This commit is contained in:
Vittorio Alfieri
2021-02-18 12:48:59 +01:00
parent bc9142ad6e
commit 17d6860505
6 changed files with 104 additions and 65 deletions
@@ -7056,7 +7056,7 @@ toughness=4
[/card] [/card]
[card] [card]
name=Calciform Pools name=Calciform Pools
auto={T}:add {1} auto={T}:add{C}
auto={1}{T}:counter(0/0,1,Storage) auto={1}{T}:counter(0/0,1,Storage)
auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{U} _ choice add{W} !$ controller auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{U} _ choice add{W} !$ controller
text={T}: Add {1} to your mana pool. -- {1}, {T}: Put a storage counter on Calciform Pools. -- {1}, Remove X storage counters from Calciform Pools: Add X mana in any combination of {W} and/or {U} to your mana pool. text={T}: Add {1} to your mana pool. -- {1}, {T}: Put a storage counter on Calciform Pools. -- {1}, Remove X storage counters from Calciform Pools: Add X mana in any combination of {W} and/or {U} to your mana pool.
@@ -7883,7 +7883,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Cave of Temptation name=Cave of Temptation
auto={T}:add {1} auto={T}:add{C}
auto={1}{T}:Add{W} auto={1}{T}:Add{W}
auto={1}{T}:Add{U} auto={1}{T}:Add{U}
auto={1}{T}:Add{B} auto={1}{T}:Add{B}
@@ -11036,7 +11036,7 @@ toughness=4
[/card] [/card]
[card] [card]
name=Cryptic Caves name=Cryptic Caves
auto={T}:add {1} auto={T}:add{C}
auto=aslongas(land|myBattlefield) {1}{T}{S}:draw:1 >4 auto=aslongas(land|myBattlefield) {1}{T}{S}:draw:1 >4
text={T}: Add {1}. -- {1}, {T}, Sacrifice Cryptic Caves: Draw a card. Activate this ability only if you control five or more lands. text={T}: Add {1}. -- {1}, {T}, Sacrifice Cryptic Caves: Draw a card. Activate this ability only if you control five or more lands.
type=Land type=Land
@@ -14171,7 +14171,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Dreadship Reef name=Dreadship Reef
auto={T}: Add {1} auto={T}:add{C}
auto={1}{T}:counter(0/0,1,Storage) auto={1}{T}:counter(0/0,1,Storage)
auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{U} _ choice add{B} !$ controller auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{U} _ choice add{B} !$ controller
text={T}: Add {C}. -- {1}, {T}: Put a storage counter on Dreadship Reef. -- {1}, Remove X storage counters from Dreadship Reef: Add X mana in any combination of {U} and/or {B}. text={T}: Add {C}. -- {1}, {T}: Put a storage counter on Dreadship Reef. -- {1}, Remove X storage counters from Dreadship Reef: Add X mana in any combination of {U} and/or {B}.
@@ -17533,7 +17533,7 @@ type=Land
[card] [card]
name=Field of the Dead name=Field of the Dead
auto=tap(noevent) auto=tap(noevent)
auto={T}:add {1} auto={T}:add{C}
auto=aslongas(land|myBattlefield) create(zombie:creature zombie:2/2:black) >7 auto=aslongas(land|myBattlefield) create(zombie:creature zombie:2/2:black) >7
auto=aslongas(land|myBattlefield) @movedTo(land|myBattlefield):create(zombie:creature zombie:2/2:black) >7 auto=aslongas(land|myBattlefield) @movedTo(land|myBattlefield):create(zombie:creature zombie:2/2:black) >7
text=Field of the Dead enters the battlefield tapped. -- {T}: Add {1}. -- Whenever Field of the Dead or another land enters the battlefield under your control, if you control seven or more lands with different names, create a 2/2 black Zombie creature token. text=Field of the Dead enters the battlefield tapped. -- {T}: Add {1}. -- Whenever Field of the Dead or another land enters the battlefield under your control, if you control seven or more lands with different names, create a 2/2 black Zombie creature token.
@@ -19274,7 +19274,7 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Fungal Reaches name=Fungal Reaches
auto={T}: Add {1} auto={T}:add{C}
auto={1}{T}:counter(0/0,1,Storage) auto={1}{T}:counter(0/0,1,Storage)
auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{R} _ choice add{G} !$ controller auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{R} _ choice add{G} !$ controller
text={T}: Add {C}. -- {1}, {T}: Put a storage counter on Fungal Reaches. -- {1}, Remove X storage counters from Fungal Reaches: Add X mana in any combination of {R} and/or {G}. text={T}: Add {C}. -- {1}, {T}: Put a storage counter on Fungal Reaches. -- {1}, Remove X storage counters from Fungal Reaches: Add X mana in any combination of {R} and/or {G}.
@@ -22876,7 +22876,7 @@ toughness=3
[/card] [/card]
[card] [card]
name=Hall of Heliod's Generosity name=Hall of Heliod's Generosity
auto={T}:add {1} auto={T}:add{C}
auto={1}{W}{T}:moveTo(mylibrary) target(enchantment|mygraveyard) auto={1}{W}{T}:moveTo(mylibrary) target(enchantment|mygraveyard)
text={T}: Add {1}. -- {1}{W}, {T}: Put target enchantment card from your graveyard on top of your library. text={T}: Add {1}. -- {1}{W}, {T}: Put target enchantment card from your graveyard on top of your library.
type=Legendary Land type=Legendary Land
@@ -28286,7 +28286,7 @@ toughness=3
[card] [card]
name=Kess, Dissident Mage name=Kess, Dissident Mage
abilities=flying abilities=flying
auto={0}:target(instant,sorcery|mygraveyard) tempflashback ueot myTurnOnly limit:1 auto={0}:ability$!name(Give flashback) name(Give flashback) target(*[instant;sorcery]|mygraveyard) tempflashback ueot!$ controller limit:1 myturnonly
text=Flying -- During each of your turns, you may cast an instant or sorcery card from your graveyard. If a card cast this way would be put into your graveyard, exile it instead. text=Flying -- During each of your turns, you may cast an instant or sorcery card from your graveyard. If a card cast this way would be put into your graveyard, exile it instead.
mana={1}{U}{B}{R} mana={1}{U}{B}{R}
type=Legendary Creature type=Legendary Creature
@@ -32576,7 +32576,7 @@ toughness=3
[card] [card]
name=Maze's End name=Maze's End
auto=tap(noevent) auto=tap(noevent)
auto={T}:Add {1} auto={T}:add{C}
aicode=activate aicode=activate
auto={3}{T}{H(this|mybattlefield)}{3}{T}:name(search a gate) target(land[Gate]|myLibrary) moveTo(myBattlefield) and!( if compare(diffcardcounttypegate)~morethan~9 then wingame controller )! auto={3}{T}{H(this|mybattlefield)}{3}{T}:name(search a gate) target(land[Gate]|myLibrary) moveTo(myBattlefield) and!( if compare(diffcardcounttypegate)~morethan~9 then wingame controller )!
text=Mazes End enters the battlefield tapped. -- {T}:Add {C}. -- {3},{T},Return Mazes End to its owners hand: Search your library for a Gate card, put it onto the battlefield, then shuffle your library. If you control ten or more Gates with different names, you win the game. text=Mazes End enters the battlefield tapped. -- {T}:Add {C}. -- {3},{T},Return Mazes End to its owners hand: Search your library for a Gate card, put it onto the battlefield, then shuffle your library. If you control ten or more Gates with different names, you win the game.
@@ -33638,7 +33638,7 @@ type=Instant
[/card] [/card]
[card] [card]
name=Molten Slagheap name=Molten Slagheap
auto={T}: Add {1} auto={T}:add{C}
auto={1}{T}:counter(0/0,1,Storage) auto={1}{T}:counter(0/0,1,Storage)
auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{B} _ choice add{R} !$ controller auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{B} _ choice add{R} !$ controller
text={T}: Add {C}. -- {1}, {T}: Put a storage counter on Molten Slagheap. -- {1}, Remove X storage counters from Molten Slagheap: Add X mana in any combination of {B} and/or {R}. text={T}: Add {C}. -- {1}, {T}: Put a storage counter on Molten Slagheap. -- {1}, Remove X storage counters from Molten Slagheap: Add X mana in any combination of {B} and/or {R}.
@@ -40403,7 +40403,7 @@ auto=@movedTo(*[blue]|mystack):counter(1/1)
auto=@movedTo(*[black]|mystack):counter(1/1) auto=@movedTo(*[black]|mystack):counter(1/1)
auto=@movedTo(*[red]|mystack):counter(1/1) auto=@movedTo(*[red]|mystack):counter(1/1)
auto=@movedTo(*[green]|mystack):counter(1/1) auto=@movedTo(*[green]|mystack):counter(1/1)
auto={C(1/1,-5)}:Add {W}{W}{U}{U}{B}{B}{R}{R}{G}{G} limit:1 auto={C(1/1,-5)}:add{W}{W}{U}{U}{B}{B}{R}{R}{G}{G} limit:1
text=Flying -- Whenever you cast a spell, put a +1/+1 counter on Ramos, Dragon Engine for each of that spell's colors. -- Remove five +1/+1 counters from Ramos: Add {W}{W}{U}{U}{B}{B}{R}{R}{G}{G}. Activate this ability only once each turn. text=Flying -- Whenever you cast a spell, put a +1/+1 counter on Ramos, Dragon Engine for each of that spell's colors. -- Remove five +1/+1 counters from Ramos: Add {W}{W}{U}{U}{B}{B}{R}{R}{G}{G}. Activate this ability only once each turn.
mana={6} mana={6}
type=Legendary Artifact Creature type=Legendary Artifact Creature
@@ -43356,7 +43356,7 @@ type=Instant
[card] [card]
name=Runaway Steam-Kin name=Runaway Steam-Kin
auto=@movedTo(*[red]|mystack) restriction{(counter(1/1))~lessthan~3}:counter(1/1) auto=@movedTo(*[red]|mystack) restriction{(counter(1/1))~lessthan~3}:counter(1/1)
auto={C(1/1,-3)}:Add {R}{R}{R} auto={C(1/1,-3)}:add{R}{R}{R}
text=Whenever you cast a red spell, if Runaway Steam-Kin has fewer than three +1/+1 counters on it, put a +1/+1 counter on Runaway Steam-Kin. -- Remove three +1/+1 counters from Runaway Steam-Kin: Add {R}{R}{R}. text=Whenever you cast a red spell, if Runaway Steam-Kin has fewer than three +1/+1 counters on it, put a +1/+1 counter on Runaway Steam-Kin. -- Remove three +1/+1 counters from Runaway Steam-Kin: Add {R}{R}{R}.
mana={1}{R} mana={1}{R}
type=Creature type=Creature
@@ -43821,7 +43821,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Saltcrusted Steppe name=Saltcrusted Steppe
auto={T}: Add {1} auto={T}:add{C}
auto={1}{T}:counter(0/0,1,Storage) auto={1}{T}:counter(0/0,1,Storage)
auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{G} _ choice add{W} !$ controller auto={1}{C(0/0,-1,Storage)}: ability$! _ choice add{G} _ choice add{W} !$ controller
text={T}: Add {C}. -- {1}, {T}: Put a storage counter on Saltcrusted Steppe. -- {1}, Remove X storage counters from Saltcrusted Steppe: Add X mana in any combination of {G} and/or {W}. text={T}: Add {C}. -- {1}, {T}: Put a storage counter on Saltcrusted Steppe. -- {1}, Remove X storage counters from Saltcrusted Steppe: Add X mana in any combination of {G} and/or {W}.
@@ -51999,6 +51999,16 @@ power=1
toughness=2 toughness=2
[/card] [/card]
[card] [card]
name=Synthetic Destiny
aicode=activate transforms((,newability[target(*[zpos=findfirsttypecreature]|mylibrary) transforms((,newability[phaseaction[endofturn once] moveTo(myBattlefield) and!( shuffle )!])) ueot])) oneshot
auto=count(type:creature:mybattlefield)
auto=all(creature|myBattlefield) moveto(exile)
auto=thisforeach(variable{countedamount}) ability$!name(Reveal from top) name(Reveal from top) reveal:1 revealuntil(creature|mylibrary) optionone name(Choose creature to play end of turn) target(creature|myreveal) moveto(mylibrary) and!( becomes(tobecast) ueot )! optiononeend optiontwo name(Put back) target(*|myreveal) moveto(mylibrary) and!( all(*|myreveal) moveto(mylibrary) )! optiontwoend afterrevealed all(tobecast|mylibrary) transforms((,newability[phaseaction[endofturn once] moveTo(myBattlefield) and!( shuffle )!])) ueot afterrevealedend revealend!$ controller
text=Exile all creatures you control. At the beginning of the next end step, reveal cards from the top of your library until you reveal that many creature cards, put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library.
mana={4}{U}{U}
type=Instant
[/card]
[card]
name=Syr Alin, the Lion's Claw name=Syr Alin, the Lion's Claw
abilities=first strike abilities=first strike
auto=@combat(attacking) source(this):all(other creature|mybattlefield) 1/1 ueot auto=@combat(attacking) source(this):all(other creature|mybattlefield) 1/1 ueot
@@ -52281,7 +52291,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Talisman of Conviction name=Talisman of Conviction
auto={T}:add {1} auto={T}:add{C}
auto={T}:add{R} and!( damage:1 controller )! auto={T}:add{R} and!( damage:1 controller )!
auto={T}:add{W} and!( damage:1 controller )! auto={T}:add{W} and!( damage:1 controller )!
text={T}: Add {1}. -- {T}: Add {R} or {W}. Talisman of Conviction deals 1 damage to you. text={T}: Add {1}. -- {T}: Add {R} or {W}. Talisman of Conviction deals 1 damage to you.
@@ -52299,7 +52309,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Talisman of Curiosity name=Talisman of Curiosity
auto={T}:add {1} auto={T}:add{C}
auto={T}:add{G} and!( damage:1 controller )! auto={T}:add{G} and!( damage:1 controller )!
auto={T}:add{U} and!( damage:1 controller )! auto={T}:add{U} and!( damage:1 controller )!
text={T}: Add {1}. -- {T}: Add {G} or {U}. Talisman of Curiosity deals 1 damage to you. text={T}: Add {1}. -- {T}: Add {G} or {U}. Talisman of Curiosity deals 1 damage to you.
@@ -52308,7 +52318,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Talisman of Hierarchy name=Talisman of Hierarchy
auto={T}:add {1} auto={T}:add{C}
auto={T}:add{B} and!( damage:1 controller )! auto={T}:add{B} and!( damage:1 controller )!
auto={T}:add{W} and!( damage:1 controller )! auto={T}:add{W} and!( damage:1 controller )!
text={T}: Add {1}. -- {T}: Add {W} or {B}. Talisman of Hierarchy deals 1 damage to you. text={T}: Add {1}. -- {T}: Add {W} or {B}. Talisman of Hierarchy deals 1 damage to you.
@@ -52317,7 +52327,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Talisman of Resilience name=Talisman of Resilience
auto={T}:add {1} auto={T}:add{C}
auto={T}:add{G} and!( damage:1 controller )! auto={T}:add{G} and!( damage:1 controller )!
auto={T}:add{B} and!( damage:1 controller )! auto={T}:add{B} and!( damage:1 controller )!
text={T}: Add {1}. -- {T}: Add {B} or {G}. Talisman of Resilience deals 1 damage to you. text={T}: Add {1}. -- {T}: Add {B} or {G}. Talisman of Resilience deals 1 damage to you.
@@ -60048,7 +60058,7 @@ subtype=Swamp Forest
[/card] [/card]
[card] [card]
name=Woodland Mystic name=Woodland Mystic
auto={T}:Add {G} auto={T}:add{G}
text={T}: Add {G}. text={T}: Add {G}.
mana={1}{G} mana={1}{G}
type=Creature type=Creature
+6 -6
View File
@@ -16061,7 +16061,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Cabal Coffers name=Cabal Coffers
auto={2}{T}:name(Add {B} for each swamp) foreach(swamp|myBattlefield) add{B} auto={2}{T}:name(Add black mana for each swamp) foreach(swamp|myBattlefield) add{B}
text={2}, {T}: Add {B} to your mana pool for each Swamp you control. text={2}, {T}: Add {B} to your mana pool for each Swamp you control.
type=Land type=Land
[/card] [/card]
@@ -44265,7 +44265,7 @@ type=Sorcery
[/card] [/card]
[card] [card]
name=Gaea's Cradle name=Gaea's Cradle
auto={T}:name(add {G} for each creature) foreach(creature|myBattlefield) add{G} auto={T}:name(add green mana for each creature) foreach(creature|myBattlefield) add{G}
text={T}: Add {G} to your mana pool for each creature you control. text={T}: Add {G} to your mana pool for each creature you control.
type=Legendary Land type=Legendary Land
[/card] [/card]
@@ -70219,8 +70219,8 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Mana Echoes name=Mana Echoes
auto=@movedTo(creature|myBattlefield):may name(Add {C} for each creature that shares...) all(trigger) transforms((,newability[foreach(*[creature;share!types!]|mybattlefield) add{1} oneshot])) auto=@movedTo(creature|myBattlefield):may name(Add colorless mana for each creature that shares...) all(trigger) transforms((,newability[foreach(*[creature;share!types!]|mybattlefield) add{1} oneshot]))
auto=@movedTo(creature|opponentBattlefield):may name(Add {C} for each creature that shares...) all(trigger) transforms((,newability[foreach(*[creature;share!types!]|opponentbattlefield) add{1} opponent oneshot])) auto=@movedTo(creature|opponentBattlefield):may name(Add colorless mana for each creature that shares...) all(trigger) transforms((,newability[foreach(*[creature;share!types!]|opponentbattlefield) add{1} opponent oneshot]))
text=Whenever a creature enters the battlefield, you may add {C} to your mana pool for each creature you control that shares a creature type with it. text=Whenever a creature enters the battlefield, you may add {C} to your mana pool for each creature you control that shares a creature type with it.
mana={2}{R}{R} mana={2}{R}{R}
type=Enchantment type=Enchantment
@@ -102600,7 +102600,7 @@ type=Enchantment
[/card] [/card]
[card] [card]
name=Serra's Sanctum name=Serra's Sanctum
auto={T}:name(add {W} for each enchantment) foreach(enchantment|myBattlefield) add{W} auto={T}:name(add white mana for each enchantment) foreach(enchantment|myBattlefield) add{W}
text={T}: Add {W} to your mana pool for each enchantment you control. text={T}: Add {W} to your mana pool for each enchantment you control.
type=Legendary Land type=Legendary Land
[/card] [/card]
@@ -122008,7 +122008,7 @@ type=Land
[/card] [/card]
[card] [card]
name=Tolarian Academy name=Tolarian Academy
auto={T}:name(add {U} for each artifact) foreach(artifact|myBattlefield) add{U} auto={T}:name(add blue mana for each artifact) foreach(artifact|myBattlefield) add{U}
text={T}: Add {U} to your mana pool for each artifact you control. text={T}: Add {U} to your mana pool for each artifact you control.
type=Legendary Land type=Legendary Land
[/card] [/card]
@@ -581,7 +581,7 @@ subtype=Chandra
name=Chandra, Torch of Defiance name=Chandra, Torch of Defiance
auto=counter(0/0,4,loyalty) auto=counter(0/0,4,loyalty)
auto={C(0/0,1,Loyalty)}:name(+1: Exile Top Card) reveal:1 optionone target(*|reveal) moveto(exile) and!( becomes(tobecast) ueot )! optiononeend afterrevealed if type(tobecast[-land]|myexile)~morethan~0 then transforms((,newability[choice all(tobecast|myexile) castcard(restricted),newability[choice name(deal 2 damage) damage:2 opponent && all(tobecast|myexile) moveto(ownerexile)])) oneshot else choice name(deal 2 damage) damage:2 opponent && all(tobecast|myexile) moveto(ownerexile) afterrevealedend revealend auto={C(0/0,1,Loyalty)}:name(+1: Exile Top Card) reveal:1 optionone target(*|reveal) moveto(exile) and!( becomes(tobecast) ueot )! optiononeend afterrevealed if type(tobecast[-land]|myexile)~morethan~0 then transforms((,newability[choice all(tobecast|myexile) castcard(restricted),newability[choice name(deal 2 damage) damage:2 opponent && all(tobecast|myexile) moveto(ownerexile)])) oneshot else choice name(deal 2 damage) damage:2 opponent && all(tobecast|myexile) moveto(ownerexile) afterrevealedend revealend
auto={C(0/0,1,Loyalty)}:name(+1: Add {R}{R} Mana) Add{R}{R} auto={C(0/0,1,Loyalty)}:name(+1: Add two red mana) add{R}{R}
auto={C(0/0,-3,Loyalty)}:name(-3: Deals 4 damage to target creature) damage:4 target(creature) auto={C(0/0,-3,Loyalty)}:name(-3: Deals 4 damage to target creature) damage:4 target(creature)
auto={C(0/0,-7,Loyalty)}:name(-7: Emblem: "whenever cast a spell, deals 5 damage any target) emblem transforms((,newability[@movedTo(*|mystack):damage:5 target(player,creature,planeswalker)])) forever dontremove auto={C(0/0,-7,Loyalty)}:name(-7: Emblem: "whenever cast a spell, deals 5 damage any target) emblem transforms((,newability[@movedTo(*|mystack):damage:5 target(player,creature,planeswalker)])) forever dontremove
text=+1: Exile the top card of your library. You may cast that card. If you don't, Chandra, Torch of Defiance deals 2 damage to each opponent. -- +1: Add {R}{R} to your mana pool. -- -3: Chandra, Torch of Defiance deals 4 damage to target creature. -- -7: You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to target creature or player." text=+1: Exile the top card of your library. You may cast that card. If you don't, Chandra, Torch of Defiance deals 2 damage to each opponent. -- +1: Add {R}{R} to your mana pool. -- -3: Chandra, Torch of Defiance deals 4 damage to target creature. -- -7: You get an emblem with "Whenever you cast a spell, this emblem deals 5 damage to target creature or player."
@@ -649,8 +649,8 @@ subtype=Domri
name=Domri, Chaos Bringer name=Domri, Chaos Bringer
auto=counter(0/0,5,loyalty) auto=counter(0/0,5,loyalty)
aicode=activate moveto(myHand) target(creature[zpos=2]|myLibrary) aicode=activate moveto(myHand) target(creature[zpos=2]|myLibrary)
auto={C(0/0,1,Loyalty)}:name(+1: Add {R} if its a creature, Riot) add{R} && if type(creature|myStack)~morethan~0 then ability$!name(Choose one) choice name(Put a +1/1 counter) counter(1/1,1) target(creature[fresh]|myBattlefield) _ choice name(Gain Haste) haste target(creature[fresh]|myBattlefield)!$ controller auto={C(0/0,1,Loyalty)}:name(+1: Add red if its a creature, Riot) add{R} && if type(creature|myStack)~morethan~0 then ability$!name(Choose one) choice name(Put a +1/1 counter) counter(1/1,1) target(creature[fresh]|myBattlefield) _ choice name(Gain Haste) haste target(creature[fresh]|myBattlefield)!$ controller
auto={C(0/0,1,Loyalty)}:name(+1: Add {G} if its a creature, Riot) add{G} && if type(creature|myStack)~morethan~0 then ability$!name(Choose one) choice name(Put a +1/1 counter) counter(1/1,1) target(creature[fresh]|myBattlefield) _ choice name(Gain Haste) haste target(creature[fresh]|myBattlefield)!$ controller !$ controller auto={C(0/0,1,Loyalty)}:name(+1: Add green if its a creature, Riot) add{G} && if type(creature|myStack)~morethan~0 then ability$!name(Choose one) choice name(Put a +1/1 counter) counter(1/1,1) target(creature[fresh]|myBattlefield) _ choice name(Gain Haste) haste target(creature[fresh]|myBattlefield)!$ controller !$ controller
auto={C(0/0,-3,Loyalty)}:name(-3: Reveal four and put up to two creature) name(Look your Library) reveal:4 optionone name(Get a card) target(<upto:2>*[creature]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend auto={C(0/0,-3,Loyalty)}:name(-3: Reveal four and put up to two creature) name(Look your Library) reveal:4 optionone name(Get a card) target(<upto:2>*[creature]|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend
auto={C(0/0,-8,Loyalty)}:name(-8: Emblem: "Each end of turn create a 4/4 Beast) emblem transforms((,newability[@each endofturn: token(Beast,Creature Beast,4/4,red,green,trample)])) forever dontrevome auto={C(0/0,-8,Loyalty)}:name(-8: Emblem: "Each end of turn create a 4/4 Beast) emblem transforms((,newability[@each endofturn: token(Beast,Creature Beast,4/4,red,green,trample)])) forever dontrevome
text=+1: Add {R} or {G}. If that mana is spent on a creature spell, it gains riot. (It enters the battlefield with your choice of a +1/+1 counter or haste.) -- 3: Look at the top four cards of your library. You may reveal up to two creature cards from among them and put them into your hand. Put the rest on the bottom of your library in a random order. -- 8: You get an emblem with “At the beginning of each end step, create a 4/4 red and green Beast creature token with trample.” text=+1: Add {R} or {G}. If that mana is spent on a creature spell, it gains riot. (It enters the battlefield with your choice of a +1/+1 counter or haste.) -- 3: Look at the top four cards of your library. You may reveal up to two creature cards from among them and put them into your hand. Put the rest on the bottom of your library in a random order. -- 8: You get an emblem with “At the beginning of each end step, create a 4/4 red and green Beast creature token with trample.”
@@ -1278,7 +1278,7 @@ subtype=Jeska
[card] [card]
name=Jaya Ballard name=Jaya Ballard
auto=counter(0/0,5,Loyalty) auto=counter(0/0,5,Loyalty)
auto={C(0/0,1,Loyalty)}:name(+1: Add {R}{R}{R}) if type(*[instant;sorcery]|myhand)~morethan~0 then add{R}{R}{R} auto={C(0/0,1,Loyalty)}:name(+1: Add 3 red mana) if type(*[instant;sorcery]|myhand)~morethan~0 then add{R}{R}{R}
auto={C(0/0,1,Loyalty)}:name(+1: Discard up to three and draw that many) reject notatarget(<upto:3>*|myhand) and!( draw:1 controller )! auto={C(0/0,1,Loyalty)}:name(+1: Discard up to three and draw that many) reject notatarget(<upto:3>*|myhand) and!( draw:1 controller )!
auto={C(0/0,-8,Loyalty)}:name(-8: Emblem: "Yoy may cast instants or sorceries from graveyard") emblem transforms((,newability[lord(*[instant;sorcery]|mygraveyard) canplayfromgraveyard],newability[lord(*[instant;sorcery]|mygraveyard) gainedexiledeath])) forever dontremove auto={C(0/0,-8,Loyalty)}:name(-8: Emblem: "Yoy may cast instants or sorceries from graveyard") emblem transforms((,newability[lord(*[instant;sorcery]|mygraveyard) canplayfromgraveyard],newability[lord(*[instant;sorcery]|mygraveyard) gainedexiledeath])) forever dontremove
text=+1: Add {R}{R}{R}. Spend this mana only to cast instant or sorcery spells. -- +1: Discard up to three cards, then draw that many cards. -- 8: You get an emblem with “You may cast instant and sorcery spells from your graveyard. If a spell cast this way would be put into your graveyard, exile it instead.” text=+1: Add {R}{R}{R}. Spend this mana only to cast instant or sorcery spells. -- +1: Discard up to three cards, then draw that many cards. -- 8: You get an emblem with “You may cast instant and sorcery spells from your graveyard. If a spell cast this way would be put into your graveyard, exile it instead.”
@@ -1445,7 +1445,7 @@ subtype=Kiora
name=Koth of the Hammer name=Koth of the Hammer
auto=counter(0/0,3,loyalty) auto=counter(0/0,3,loyalty)
auto={C(0/0,1,Loyalty)}:name(+1: Untap target land and becomes a 4/4 Elemental) untap target(mountain) && transforms((Elemental Creature,setpower=4,settoughness=4,red)) ueot auto={C(0/0,1,Loyalty)}:name(+1: Untap target land and becomes a 4/4 Elemental) untap target(mountain) && transforms((Elemental Creature,setpower=4,settoughness=4,red)) ueot
auto={C(0/0,-2,Loyalty)}:name(-2: Add {R} for each mountain) foreach(mountain|myBattlefield) add{R} auto={C(0/0,-2,Loyalty)}:name(-2: Add red mana for each mountain) foreach(mountain|myBattlefield) add{R}
auto={C(0/0,-5,Loyalty)}:name(-5: Emblem: "Mountains gains: Deals 1 damage any target") emblem transforms((,newability[lord(mountain|mybattlefield) {T}:damage:1 target(creature)],newability[lord(mountain|mybattlefield) {T}:damage:1 target(player)])) forever dontremove auto={C(0/0,-5,Loyalty)}:name(-5: Emblem: "Mountains gains: Deals 1 damage any target") emblem transforms((,newability[lord(mountain|mybattlefield) {T}:damage:1 target(creature)],newability[lord(mountain|mybattlefield) {T}:damage:1 target(player)])) forever dontremove
text=+1: Untap target Mountain. It becomes a 4/4 red Elemental creature until end of turn. It's still a land. -- -2: Add {R} to your mana pool for each Mountain you control. -- -5: You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to target creature or player.'" text=+1: Untap target Mountain. It becomes a 4/4 red Elemental creature until end of turn. It's still a land. -- -2: Add {R} to your mana pool for each Mountain you control. -- -5: You get an emblem with "Mountains you control have '{T}: This land deals 1 damage to target creature or player.'"
mana={2}{R}{R} mana={2}{R}{R}
@@ -765,6 +765,13 @@ power=3
toughness=3 toughness=3
[/card] [/card]
[card] [card]
name=Barrel Down Sokenzan
text=Sweep — Return any number of Mountains you control to their owner's hand. Barrel Down Sokenzan deals damage to target creature equal to twice the number of Mountains returned this way.
mana={2}{R}
type=Instant
subtype=Arcane
[/card]
[card]
name=Barrin's Unmaking name=Barrin's Unmaking
text=Return target permanent to its owner's hand if that permanent shares a color with the most common color among all permanents or a color tied for most common. text=Return target permanent to its owner's hand if that permanent shares a color with the most common color among all permanents or a color tied for most common.
mana={1}{U} mana={1}{U}
@@ -2381,7 +2388,7 @@ type=Artifact
[/card] [/card]
[card] [card]
name=Crucible of the Spirit Dragon name=Crucible of the Spirit Dragon
auto={T}: Add {1} auto={T}:add{C}
auto={1}{T}:counter(0/0,1,Storage) auto={1}{T}:counter(0/0,1,Storage)
auto={T}{C(0/0,-1,Storage)}: ability$! _ choice add{U} _ choice add{B} _ choice add{G} _ choice add{R} _ choice add{W} !$ controller auto={T}{C(0/0,-1,Storage)}: ability$! _ choice add{U} _ choice add{B} _ choice add{G} _ choice add{R} _ choice add{W} !$ controller
text={T}: Add {1} to your mana pool. -- {1}, {T}: Put a storage counter on Crucible of the Spirit Dragon. -- {T}, Remove X storage counters from Crucible of the Spirit Dragon: Add X mana in any combination of colors to your mana pool. Spend this mana only to cast Dragon spells or activate abilities of Dragons. text={T}: Add {1} to your mana pool. -- {1}, {T}: Put a storage counter on Crucible of the Spirit Dragon. -- {T}, Remove X storage counters from Crucible of the Spirit Dragon: Add X mana in any combination of colors to your mana pool. Spend this mana only to cast Dragon spells or activate abilities of Dragons.
@@ -12015,12 +12022,6 @@ mana={2}{G}{G}
type=Sorcery type=Sorcery
[/card] [/card]
[card] [card]
name=Synthetic Destiny
text=Exile all creatures you control. At the beginning of the next end step, reveal cards from the top of your library until you reveal that many creature cards, put all creature cards revealed this way onto the battlefield, then shuffle the rest of the revealed cards into your library.
mana={4}{U}{U}
type=Instant
[/card]
[card]
name=Syr Cadian, Knight Owl name=Syr Cadian, Knight Owl
text=Knightlifelink (Damage dealt by Knights you control also causes you to gain that much life.) -- {W}: Syr Cadian, Knight Owl gains vigilance until end of turn. Activate this ability only from sunrise to sunset. -- {B}: Syr Cadian, Knight Owl gains flying until end of turn. Activate this ability only from sunset to sunrise. text=Knightlifelink (Damage dealt by Knights you control also causes you to gain that much life.) -- {W}: Syr Cadian, Knight Owl gains vigilance until end of turn. Activate this ability only from sunrise to sunset. -- {B}: Syr Cadian, Knight Owl gains flying until end of turn. Activate this ability only from sunset to sunrise.
mana={3}{W}{W} mana={3}{W}{W}
+32 -4
View File
@@ -2770,16 +2770,16 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
if (hasFlashback && !CanHandleCost(card->getManaCost()->getFlashback(),card)) if (hasFlashback && !CanHandleCost(card->getManaCost()->getFlashback(),card))
continue; continue;
// Case were manacost is equal to flashback cost, if they are different the AI hangs if (hasRetrace && !CanHandleCost(card->getManaCost()->getRetrace(),card))
if (hasFlashback && (card->getManaCost() != card->getManaCost()->getFlashback()))
continue; continue;
if (hasRetrace && !CanHandleCost(card->getManaCost()->getRetrace(),card)) /*// Case were manacost is equal to flashback cost, if they are different the AI hangs
if (hasFlashback && (card->getManaCost() != card->getManaCost()->getFlashback()))
continue; continue;
// Case were manacost is equal to retrace cost, if they are different the AI hangs // Case were manacost is equal to retrace cost, if they are different the AI hangs
if (hasRetrace && (card->getManaCost() != card->getManaCost()->getRetrace())) if (hasRetrace && (card->getManaCost() != card->getManaCost()->getRetrace()))
continue; continue;*/
if (card->hasType(Subtypes::TYPE_LAND)) if (card->hasType(Subtypes::TYPE_LAND))
{ {
@@ -3376,8 +3376,18 @@ MTGCardInstance * AIPlayerBaka::FindCardToPlay(ManaCost * pMana, const char * ty
} }
if(nextCardToPlay) if(nextCardToPlay)
{ {
if(nextCardToPlay->currentZone == game->graveyard && !nextCardToPlay->has(Constants::CANPLAYFROMGRAVEYARD) && !nextCardToPlay->has(Constants::TEMPFLASHBACK)){ //Now AI can play cards with flashback and retrace costs.
if(nextCardToPlay->getManaCost()->getFlashback()){
if(!pMana->canAfford(nextCardToPlay->getManaCost()->getFlashback(),0))
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost()->getFlashback(),nextCardToPlay->has(Constants::ANYTYPEOFMANA));
} else if(nextCardToPlay->getManaCost()->getRetrace()){
if(!pMana->canAfford(nextCardToPlay->getManaCost()->getRetrace(),0))
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost()->getRetrace(),nextCardToPlay->has(Constants::ANYTYPEOFMANA));
}
} else {
if(!pMana->canAfford(nextCardToPlay->getManaCost(),0) || nextCardToPlay->getManaCost()->getKicker()) if(!pMana->canAfford(nextCardToPlay->getManaCost(),0) || nextCardToPlay->getManaCost()->getKicker())
gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost(),nextCardToPlay->has(Constants::ANYTYPEOFMANA)); gotPayments = canPayMana(nextCardToPlay,nextCardToPlay->getManaCost(),nextCardToPlay->has(Constants::ANYTYPEOFMANA));
}
DebugTrace(" AI wants to play card." << endl DebugTrace(" AI wants to play card." << endl
<< "- Next card to play: " << (nextCardToPlay ? nextCardToPlay->name : "None" ) << endl ); << "- Next card to play: " << (nextCardToPlay ? nextCardToPlay->name : "None" ) << endl );
@@ -3696,12 +3706,30 @@ int AIPlayerBaka::computeActions()
gotPayments.clear();//if any. gotPayments.clear();//if any.
return 1; return 1;
} }
if(nextCardToPlay->currentZone == game->graveyard && !nextCardToPlay->has(Constants::CANPLAYFROMGRAVEYARD) && !nextCardToPlay->has(Constants::TEMPFLASHBACK)){ //Now AI can play cards with flashback and retrace costs.
if(nextCardToPlay->getManaCost()->getFlashback()){
if(payTheManaCost(nextCardToPlay->getManaCost()->getFlashback(),nextCardToPlay->has(Constants::ANYTYPEOFMANA),nextCardToPlay,gotPayments))
{
AIAction * a = NEW AIAction(this, nextCardToPlay);
clickstream.push(a);
gotPayments.clear();
}
} else if(nextCardToPlay->getManaCost()->getRetrace()){
if(payTheManaCost(nextCardToPlay->getManaCost()->getRetrace(),nextCardToPlay->has(Constants::ANYTYPEOFMANA),nextCardToPlay,gotPayments))
{
AIAction * a = NEW AIAction(this, nextCardToPlay);
clickstream.push(a);
gotPayments.clear();
}
}
} else {
if(payTheManaCost(nextCardToPlay->getManaCost(),nextCardToPlay->has(Constants::ANYTYPEOFMANA),nextCardToPlay,gotPayments)) if(payTheManaCost(nextCardToPlay->getManaCost(),nextCardToPlay->has(Constants::ANYTYPEOFMANA),nextCardToPlay,gotPayments))
{ {
AIAction * a = NEW AIAction(this, nextCardToPlay); AIAction * a = NEW AIAction(this, nextCardToPlay);
clickstream.push(a); clickstream.push(a);
gotPayments.clear(); gotPayments.clear();
} }
}
return 1; return 1;
} }
else else
+1 -1
View File
@@ -493,7 +493,7 @@ void StatsWrapper::updateStats(DeckDataWrapper *myDeck)
for (int v = 0; v < (int) abilitiesVector.size(); v++) for (int v = 0; v < (int) abilitiesVector.size(); v++)
{ {
string s = abilitiesVector[v]; string s = abilitiesVector[v];
size_t t = s.find("add"); size_t t = s.find("add{"); //Fix crash when ability contains "counteradded" or similar substring.
if (t != string::npos) if (t != string::npos)
{ {
s = s.substr(t + 3); s = s.substr(t + 3);