Improved foretell mechanics, added a trigger for foretold cards, added a new keyword "snowdiffmana" to compare snow mana pool and mana cost of a target card, improved phaseaction "checkexile" condition.
This commit is contained in:
@@ -211,10 +211,6 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
|
||||
{
|
||||
intValue = (s == "mutations")?target->mutation:target->countColors();
|
||||
}
|
||||
else if (s == "manacost")
|
||||
{
|
||||
intValue = (target->currentZone == target->controller()->game->stack)?(target->myconvertedcost + target->castX):target->myconvertedcost;//X is 0 except if it's on the stack
|
||||
}
|
||||
else if (s.find("type:") != string::npos)
|
||||
{
|
||||
size_t begins = s.find("type:");
|
||||
@@ -571,6 +567,16 @@ void WParsedInt::init(string s, Spell * spell, MTGCardInstance * card)
|
||||
{
|
||||
intValue = card->isFlipped;
|
||||
}
|
||||
else if (s == "manacost") //Return the converted manacost
|
||||
{
|
||||
intValue = (target->currentZone == target->controller()->game->stack)?(target->myconvertedcost + target->castX):target->myconvertedcost;//X is 0 except if it's on the stack
|
||||
}
|
||||
else if(s == "snowdiffmana") //Return 1 if the difference between snowpool and converted manacost is more than 0
|
||||
{
|
||||
int snowpool = target->controller()->snowManaG + target->controller()->snowManaU + target->controller()->snowManaR + target->controller()->snowManaB + target->controller()->snowManaW + target->controller()->snowManaC;
|
||||
int manacost = (target->currentZone == target->controller()->game->stack)?(target->myconvertedcost + target->castX):target->myconvertedcost;//X is 0 except if it's on the stack
|
||||
intValue = (snowpool >= manacost)?1:0;
|
||||
}
|
||||
else if (s == "mysnowpoolcount" || s == "opponentsnowpoolcount") // snowpoolcount is just to count the number of snow mana produced ...
|
||||
{
|
||||
intValue = (s == "mysnowpoolcount")?(target->controller()->snowManaG + target->controller()->snowManaU + target->controller()->snowManaR + target->controller()->snowManaB + target->controller()->snowManaW + target->controller()->snowManaC):(target->controller()->opponent()->snowManaG + target->controller()->opponent()->snowManaU + target->controller()->opponent()->snowManaR + target->controller()->opponent()->snowManaB + target->controller()->opponent()->snowManaW + target->controller()->opponent()->snowManaC);
|
||||
|
||||
Reference in New Issue
Block a user