added converge keyword

converge returns the number of colors spent when casting the spell.
example you pay {2}{W}{W}{R}{B}, converge returns 3, white, black and
red colors spent with...
This commit is contained in:
Anthony Calosa
2015-09-29 15:09:29 +08:00
parent 9b79602134
commit 8eddcfb639

View File

@@ -556,6 +556,15 @@ private:
intValue = card->previous->previous->sunburst;
}
}
else if (s == "converge")
{
intValue = 0;
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
{
if(card->getManaCost()->getManaUsedToCast()->hasColor(i))
intValue +=1;
}
}
else if (s == "targetedcurses")
{
if(card->playerTarget)