Add support for reducing Hybrid cost

it doesn't remove the hybrid icons but it reduces the cost.
This commit is contained in:
Anthony Calosa
2016-07-11 07:55:12 +08:00
parent a72fb6f01a
commit 69db7f7384
5 changed files with 231 additions and 161 deletions
+18
View File
@@ -66,6 +66,24 @@ int ManaCostHybrid::getManaSymbolsHybridMerged(int color)
return 0;
}
void ManaCostHybrid::reduceValue(int color, int value)
{
if(((color1 == color) && value1))
{
if((value1 - value) < 0)
value1 = 0;
else
value1 -= value;
}
else if(((color2 == color) && value2))
{
if((value2 - value) < 0)
value2 = 0;
else
value2 -= value;
}
}
int ManaCostHybrid::hasColor(int color)
{
if (((color1 == color) && value1) || ((color2 == color) && value2))