fixed an issue where color= was not setting multiple colors on a card with this line.

Issue: 491
This commit is contained in:
omegablast2002@yahoo.com
2010-10-17 13:17:27 +00:00
parent 8fdb64e9ce
commit 6a81228275
+21 -2
View File
@@ -88,9 +88,28 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi
if (!primitive) primitive = NEW CardPrimitive();
{
string value = val;
std::transform(value.begin(), value.end(), value.begin(), ::tolower);
primitive->setColor(value, 1);
std::transform(value.begin(), value.end(), value.begin(), ::tolower);
int found = value.find("green");
if (found != string::npos){
primitive->setColor(1,0);
}
found = value.find("blue");
if (found != string::npos){
primitive->setColor(2,0);
}
found = value.find("red");
if(found != string::npos){
primitive->setColor(3,0);
}
found = value.find("black");
if (found != string::npos){
primitive->setColor(4,0);
}
found = value.find("white");
if (found != string::npos){
primitive->setColor(5,0);
}
}
break;
case 'g': //grade