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
@@ -525,7 +525,7 @@ subtype=Chandra
name=Chandra, Novice Pyromancer
auto=counter(0/0,5,loyalty)
auto={C(0/0,1,Loyalty)}:name(+1: Elemental creatures gets +2/+0) all(creature[elemental]|mybattlefield) 2/0 ueot
auto={C(0/0,-1,Loyalty)}:name(-1: Add two red mana) add {R}{R}
auto={C(0/0,-1,Loyalty)}:name(-1: Add two red mana) add{R}{R}
auto={C(0/0,-2,Loyalty)}:name(-2: Deals 2 damage to any target) damage:2 target(player,creature,planeswalker)
text=+1: Elementals you control get +2/+0 until end of turn. -- -1: Add {R}{R}. -- -2: Chandra, Novice Pyromancer deals 2 damage to any target.
mana={3}{R}
@@ -581,7 +581,7 @@ subtype=Chandra
name=Chandra, Torch of Defiance
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: 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,-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."
@@ -649,8 +649,8 @@ subtype=Domri
name=Domri, Chaos Bringer
auto=counter(0/0,5,loyalty)
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 {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 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 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,-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.”
@@ -1278,7 +1278,7 @@ subtype=Jeska
[card]
name=Jaya Ballard
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,-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.”
@@ -1445,7 +1445,7 @@ subtype=Kiora
name=Koth of the Hammer
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,-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
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}