fixed an issue where color= was not setting multiple colors on a card with this line.
Issue: 491
This commit is contained in:
@@ -89,7 +89,26 @@ int MTGAllCards::processConfLine(string &s, MTGCard *card, CardPrimitive * primi
|
|||||||
{
|
{
|
||||||
string value = val;
|
string value = val;
|
||||||
std::transform(value.begin(), value.end(), value.begin(), ::tolower);
|
std::transform(value.begin(), value.end(), value.begin(), ::tolower);
|
||||||
primitive->setColor(value, 1);
|
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;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user