re add the comparison

This commit is contained in:
Anthony Calosa
2016-06-01 09:26:58 +08:00
parent a36b47e500
commit 9e50187740
+9 -9
View File
@@ -260,12 +260,7 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
{ {
manaCost->addExtraCost(NEW CycleCost(tc)); manaCost->addExtraCost(NEW CycleCost(tc));
} }
else if(value == "c") else if(value.find("(") != string::npos)
{
manaCost->add(Constants::MTG_COLOR_WASTE, 1);
break;
}
else
{ {
size_t counter_start = value.find("("); size_t counter_start = value.find("(");
size_t counter_end = value.find(")", counter_start); size_t counter_end = value.find(")", counter_start);
@@ -292,9 +287,14 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
} }
manaCost->addExtraCost(NEW CounterCost(counter, tc)); manaCost->addExtraCost(NEW CounterCost(counter, tc));
break; break;
} }
break; else if(value == "c")
} {
manaCost->add(Constants::MTG_COLOR_WASTE, 1);
break;
}
break;
}
default: //uncolored cost and hybrid costs and special cost default: //uncolored cost and hybrid costs and special cost
{ {
if(value == "unattach") if(value == "unattach")