Fixed primitives, added a new keyword "eval()" in ManaCost parser to allow the usage of a variable in the manacost (e.g. "{eval(evictmc)}" in primitive "Prototype Portal").

This commit is contained in:
Vittorio Alfieri
2021-11-21 13:38:09 +01:00
parent 6ca5291790
commit d11facd7d4
4 changed files with 32 additions and 89 deletions

View File

@@ -2,8 +2,11 @@
## [master] (https://github.com/WagicProject/wagic/tree/master)
### 21/11/21
- *Committed:* Fixed primitives, added a new keyword "eval()" in ManaCost parser to allow the usage of a variable in the manacost (e.g. "{eval(evictmc)}" in primitive "Prototype Portal"). ([Vitty85](https://github.com/Vitty85))
### 19/11/21
- *Committed:* Updated the changelog. ([Vitty85](https://github.com/Vitty85))
- *Committed:* Updated the changelog. https://github.com/WagicProject/wagic/commit/6ca5291790bac73d45b0963c9ddce9ab89eb0fd3 ([Vitty85](https://github.com/Vitty85))
- *Committed:* Bug fixes on primitives. https://github.com/WagicProject/wagic/commit/14103a840d8316ace0a7f979c4aada63e35ac178 ([EduardoMunozGomez](https://github.com/EduardoMunozGomez))

View File

@@ -21610,27 +21610,7 @@ type=Sorcery
[card]
name=Elite Arcanist
auto=may name(Exile instant from hand) target(instant|myhand) imprint
auto=this(variable{hasevict}>0) this(variable{evictmc}=0) {T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=1) {1}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=2) {2}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=3) {3}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=4) {4}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=5) {5}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=6) {6}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=7) {7}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=8) {8}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=9) {9}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=10) {10}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=11) {11}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=12) {12}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=13) {13}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=14) {14}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=15) {15}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=16) {16}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=17) {17}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=18) {18}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}=19) {19}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) this(variable{evictmc}>=20) {20}{T}:name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)
auto=this(variable{hasevict}>0) transforms((,newability[{eval(evictmc)}{T}:name(Cast a copy of exiled instant) name(Cast a copy of exiled instant) activate castcard(copied noevent named!:imprintedcard:!)]))
text=When Elite Arcanist enters the battlefield, you may exile an instant card from your hand. -- {X}, {T}: Copy the exiled card. You may cast the copy without paying its mana cost. X is the converted mana cost of the exiled card.
mana={3}{U}
type=Creature
@@ -28075,28 +28055,8 @@ type=Instant
[card]
name=Gelatinous Cube
auto=name(Engulf) target(creature[-ooze]|opponentbattlefield) imprint
auto=this(variable{hasevict}>0) transforms((,newability[@movedto(this|nonbattlezone) from(battlefield):name(Return exiled creature) target(creature[evictname]|opponentexile) moveTo(ownerbattlefield)]
auto=this(variable{hasevict}>0) this(variable{evictmc}=0) {B}:name(X=0) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=1) {1}{B}:name(X=1) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=2) {2}{B}:name(X=2) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=3) {3}{B}:name(X=3) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=4) {4}{B}:name(X=4) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=5) {5}{B}:name(X=5) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=6) {6}{B}:name(X=6) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=7) {7}{B}:name(X=7) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=8) {8}{B}:name(X=8) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=9) {9}{B}:name(X=9) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=10) {10}{B}:name(X=10) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=11) {11}{B}:name(X=11) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=12) {12}{B}:name(X=12) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=13) {13}{B}:name(X=13) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=14) {14}{B}:name(X=14) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=15) {15}{B}:name(X=15) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=16) {16}{B}:name(X=16) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=17) {17}{B}:name(X=17) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=18) {18}{B}:name(X=18) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}=19) {19}{B}:name(X=19) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) this(variable{evictmc}>=20) {20}{B}:name(X=20) target(creature[evictname]|opponentexile) moveto(ownergraveyard)
auto=this(variable{hasevict}>0) transforms((,newability[@movedto(this|nonbattlezone) from(battlefield):name(Return exiled creature) target(creature[evictname]|opponentexile) moveTo(ownerbattlefield)]))
auto=this(variable{hasevict}>0) transforms((,newability[{eval(evictmc)}{B}:name(Put exiled creature in graveyard) name(Put exiled creature in graveyard) target(creature[evictname]|opponentexile) moveto(ownergraveyard)]))
text=Engulf - When Gelatinous Cube enters the battlefield, exile target non-Ooze creature an opponent controls until Gelatinous Cube leaves the battlefield. -- Dissolve-{X}{B}: Put target creature card with mana value X exiled with Gelatinous Cube into its owner's graveyard.
mana={2}{B}{B}
type=Creature
@@ -54546,28 +54506,8 @@ toughness=5
[/card]
[card]
name=Prototype Portal
auto=choice name(Don't exile any artifact) donothing
auto=if type(artifact[manacost=0]|myhand)~morethan~0 then choice name(Exile artifact with manacost 0) name(Exile artifact with manacost 0) transforms((,newability[moveto(exile) target(artifact[manacost=0]|myhand)],newability[{T}:name(mana cost {0}) clone target(artifact[manacost=0]|myexile)])) forever
auto=if type(artifact[manacost=1]|myhand)~morethan~0 then choice name(Exile artifact with manacost 1) name(Exile artifact with manacost 1) transforms((,newability[moveto(exile) target(artifact[manacost=1]|myhand)],newability[{T}{1}:name(mana cost {1}) clone target(artifact[manacost=1]|myexile)])) forever
auto=if type(artifact[manacost=2]|myhand)~morethan~0 then choice name(Exile artifact with manacost 2) name(Exile artifact with manacost 2) transforms((,newability[moveto(exile) target(artifact[manacost=2]|myhand)],newability[{T}{2}:name(mana cost {2}) clone target(artifact[manacost=2]|myexile)])) forever
auto=if type(artifact[manacost=3]|myhand)~morethan~0 then choice name(Exile artifact with manacost 3) name(Exile artifact with manacost 3) transforms((,newability[moveto(exile) target(artifact[manacost=3]|myhand)],newability[{T}{3}:name(mana cost {3}) clone target(artifact[manacost=3]|myexile)])) forever
auto=if type(artifact[manacost=4]|myhand)~morethan~0 then choice name(Exile artifact with manacost 4) name(Exile artifact with manacost 4) transforms((,newability[moveto(exile) target(artifact[manacost=4]|myhand)],newability[{T}{4}:name(mana cost {4}) clone target(artifact[manacost=4]|myexile)])) forever
auto=if type(artifact[manacost=5]|myhand)~morethan~0 then choice name(Exile artifact with manacost 5) name(Exile artifact with manacost 5) transforms((,newability[moveto(exile) target(artifact[manacost=5]|myhand)],newability[{T}{5}:name(mana cost {5}) clone target(artifact[manacost=5]|myexile)])) forever
auto=if type(artifact[manacost=6]|myhand)~morethan~0 then choice name(Exile artifact with manacost 6) name(Exile artifact with manacost 6) transforms((,newability[moveto(exile) target(artifact[manacost=6]|myhand)],newability[{T}{6}:name(mana cost {6}) clone target(artifact[manacost=6]|myexile)])) forever
auto=if type(artifact[manacost=7]|myhand)~morethan~0 then choice name(Exile artifact with manacost 7) name(Exile artifact with manacost 7) transforms((,newability[moveto(exile) target(artifact[manacost=7]|myhand)],newability[{T}{7}:name(mana cost {7}) clone target(artifact[manacost=7]|myexile)])) forever
auto=if type(artifact[manacost=8]|myhand)~morethan~0 then choice name(Exile artifact with manacost 8) name(Exile artifact with manacost 8) transforms((,newability[moveto(exile) target(artifact[manacost=8]|myhand)],newability[{T}{8}:name(mana cost {8}) clone target(artifact[manacost=8]|myexile)])) forever
auto=if type(artifact[manacost=9]|myhand)~morethan~0 then choice name(Exile artifact with manacost 9) name(Exile artifact with manacost 9) transforms((,newability[moveto(exile) target(artifact[manacost=9]|myhand)],newability[{T}{9}:name(mana cost {9}) clone target(artifact[manacost=9]|myexile)])) forever
auto=if type(artifact[manacost=10]|myhand)~morethan~0 then choice name(Exile artifact with manacost 10) name(Exile artifact with manacost 10) transforms((,newability[moveto(exile) target(artifact[manacost=10]|myhand)],newability[{T}{10}:name(mana cost {10}) clone target(artifact[manacost=10]|myexile)])) forever
auto=if type(artifact[manacost=11]|myhand)~morethan~0 then choice name(Exile artifact with manacost 11) name(Exile artifact with manacost 11) transforms((,newability[moveto(exile) target(artifact[manacost=11]|myhand)],newability[{T}{11}:name(mana cost {11}) clone target(artifact[manacost=11]|myexile)])) forever
auto=if type(artifact[manacost=12]|myhand)~morethan~0 then choice name(Exile artifact with manacost 12) name(Exile artifact with manacost 12) transforms((,newability[moveto(exile) target(artifact[manacost=12]|myhand)],newability[{T}{12}:name(mana cost {12}) clone target(artifact[manacost=12]|myexile)])) forever
auto=if type(artifact[manacost=13]|myhand)~morethan~0 then choice name(Exile artifact with manacost 13) name(Exile artifact with manacost 13) transforms((,newability[moveto(exile) target(artifact[manacost=13]|myhand)],newability[{T}{13}:name(mana cost {13}) clone target(artifact[manacost=13]|myexile)])) forever
auto=if type(artifact[manacost=14]|myhand)~morethan~0 then choice name(Exile artifact with manacost 14) name(Exile artifact with manacost 14) transforms((,newability[moveto(exile) target(artifact[manacost=14]|myhand)],newability[{T}{14}:name(mana cost {14}) clone target(artifact[manacost=14]|myexile)])) forever
auto=if type(artifact[manacost=15]|myhand)~morethan~0 then choice name(Exile artifact with manacost 15) name(Exile artifact with manacost 15) transforms((,newability[moveto(exile) target(artifact[manacost=15]|myhand)],newability[{T}{15}:name(mana cost {15}) clone target(artifact[manacost=15]|myexile)])) forever
auto=if type(artifact[manacost=16]|myhand)~morethan~0 then choice name(Exile artifact with manacost 16) name(Exile artifact with manacost 16) transforms((,newability[moveto(exile) target(artifact[manacost=16]|myhand)],newability[{T}{16}:name(mana cost {16}) clone target(artifact[manacost=16]|myexile)])) forever
auto=if type(artifact[manacost=17]|myhand)~morethan~0 then choice name(Exile artifact with manacost 17) name(Exile artifact with manacost 17) transforms((,newability[moveto(exile) target(artifact[manacost=17]|myhand)],newability[{T}{17}:name(mana cost {17}) clone target(artifact[manacost=17]|myexile)])) forever
auto=if type(artifact[manacost=18]|myhand)~morethan~0 then choice name(Exile artifact with manacost 18) name(Exile artifact with manacost 18) transforms((,newability[moveto(exile) target(artifact[manacost=18]|myhand)],newability[{T}{18}:name(mana cost {18}) clone target(artifact[manacost=18]|myexile)])) forever
auto=if type(artifact[manacost=19]|myhand)~morethan~0 then choice name(Exile artifact with manacost 19) name(Exile artifact with manacost 19) transforms((,newability[moveto(exile) target(artifact[manacost=19]|myhand)],newability[{T}{19}:name(mana cost {19}) clone target(artifact[manacost=19]|myexile)])) forever
auto=if type(artifact[manacost=20]|myhand)~morethan~0 then choice name(Exile artifact with manacost 20) name(Exile artifact with manacost 20) transforms((,newability[moveto(exile) target(artifact[manacost=20]|myhand)],newability[{T}{20}:name(mana cost {20}) clone target(artifact[manacost=20]|myexile)])) forever
auto=may name(Exile an artifact) imprint target(artifact|myhand)
auto=this(variable{hasevict}>0) transforms((,newability[{eval(evictmc)}{T}:name(Copy exiled card) name(Copy exiled card) clone target(artifact[evictname]|myexile)]))
text=Imprint -- When Prototype Portal enters the battlefield, you may exile an artifact card from your hand. -- {X},{T}: Create a token that's a copy of the exiled card. X is the converted mana cost of that card.
mana={4}
type=Artifact
@@ -77878,27 +77818,7 @@ autostack=if paid(alternative) then flip(backside) forcetype(Legendary Planeswal
auto=ifnot paid(alternative) then if type(creature|opponenthand)~morethan~0 then name(Reveal hand and exile creature) name(Reveal hand and exile creature) name(Reveal hand and exile creature) target(creature|opponenthand) imprint
auto=ifnot paid(alternative) then if type(creature|opponenthand)~equalto~0 then name(Reveal hand) name(Reveal hand) name(Reveal hand) target(*|opponenthand) moveto(opponenthand)
auto=this(variable{hasevict}>0) this(variable{iscopied}<1) transforms((,newability[@movedto(this|nonbattlezone) from(battlefield):name(Put back exiled creature) target(creature[evictname]|opponentexile) moveTo(opponenthand)]))
auto=this(variable{hasevict}>0) this(variable{evictmc}=0) this(variable{iscopied}<1) {0}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=1) this(variable{iscopied}<1) {1}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=2) this(variable{iscopied}<1) {2}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=3) this(variable{iscopied}<1) {3}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=4) this(variable{iscopied}<1) {4}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=5) this(variable{iscopied}<1) {5}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=6) this(variable{iscopied}<1) {6}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=7) this(variable{iscopied}<1) {7}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=8) this(variable{iscopied}<1) {8}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=9) this(variable{iscopied}<1) {9}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=10) this(variable{iscopied}<1) {10}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=11) this(variable{iscopied}<1) {11}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=12) this(variable{iscopied}<1) {12}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=13) this(variable{iscopied}<1) {13}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=14) this(variable{iscopied}<1) {14}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=15) this(variable{iscopied}<1) {15}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=16) this(variable{iscopied}<1) {16}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=17) this(variable{iscopied}<1) {17}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=18) this(variable{iscopied}<1) {18}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}=19) this(variable{iscopied}<1) {19}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{evictmc}>=20) this(variable{iscopied}<1) {20}:name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)
auto=this(variable{hasevict}>0) this(variable{iscopied}<1) transforms((,newability[{eval(evictmc)}:name(Becomes copy of exiled creature) name(Becomes copy of exiled creature) copy target(creature[evictname]|opponentexile)]))
text=When Valki enters the battlefield, each opponent reveals their hand. For each opponent, exile a creature card they revealed this way until Valki leaves the battlefield. -- {X}: Choose a creature card exiled with Valki with converted mana cost X. Valki becomes a copy of that card. // {5}{B}{R} Tibalt, Cosmic Impostor
mana={1}{B}
type=Legendary Creature

View File

@@ -84461,7 +84461,9 @@ type=Enchantment
[card]
name=Paralyze
target=creature
auto=teach(creature) transforms((,newability[tap],newability[{4}:untap myUpkeepOnly],doesnotuntap))
auto=doesnotuntap
auto=tap
auto=teach(creature) transforms((,newability[{4}:untap myUpkeepOnly]))
text=Enchant creature -- When Paralyze enters the battlefield, tap enchanted creature. -- Enchanted creature doesn't untap during its controller's untap step. -- At the beginning of the upkeep of enchanted creature's controller, that player may pay {4}. If he or she does, untap the creature.
mana={B}
type=Enchantment
@@ -118950,7 +118952,7 @@ type=Sorcery
[/card]
[card]
name=Tempting Wurm
auto=ability$!name(put onto battlefield) target(<anyamount>*[-planeswalker]|myhand) moveTo(mybattlefield)!$ opponent
auto=ability$!may name(Put onto battlefield) name(Put onto battlefield) target(<anyamount>*[artifact;creature;enchantment;land]|myhand) moveto(mybattlefield)!$ opponent
text=When Tempting Wurm enters the battlefield, each opponent may put any number of artifact, creature, enchantment, and/or land cards from his or her hand onto the battlefield.
mana={1}{G}
type=Creature

View File

@@ -165,6 +165,17 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
tc = tcf.createTargetChooser("creature|mybattlefield", c);
manaCost->addExtraCost(NEW Offering(tc,true));
}
else if(value.find("eval(") != string::npos) // Added to parse a variable in manacost.
{
size_t var_start = value.find("(");
size_t var_end = value.find(")", var_start);
string varString = value.substr(var_start + 1, var_end - var_start - 1);
WParsedInt * value = NEW WParsedInt(varString.c_str(),NULL,c);
if(value)
manaCost->add(Constants::MTG_COLOR_ARTIFACT, value->getValue());
else
break;
}
else if(value.substr(0,2) == "e:")
{//Energy Cost
vector<string>valSplit = parseBetween(value,"e:"," ",false);
@@ -225,6 +236,13 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
else
break;
}
else if (value == "myevictcost")
{
if(c && c->imprintedCards.size() && c->imprintedCards.back()->model)
manaCost->add(c->imprintedCards.back()->model->data->getManaCost());
else
break;
}
else
manaCost->addExtraCost(NEW MillCost(tc));
}