- fixed a few bugs with the parser for subtypes
- fixed a bug for plague rats
- fixed a bug for P/T parser
- First release for the following sets: Mirrodin, Mirage, Lorwyn
This commit is contained in:
wagic.the.homebrew
2009-03-14 11:00:31 +00:00
parent bb23db4b16
commit 658ef1fb12
22 changed files with 11783 additions and 59 deletions
+11 -1
View File
@@ -87,6 +87,7 @@ int MTGAllCards::processConfLine(string s, MTGCard *card){
case 'B'://Basic Land
card->setColor(Constants::MTG_COLOR_LAND);
card->setType("Land");
card->setType("Basic");
break;
case 'L':
card->setColor(Constants::MTG_COLOR_LAND);
@@ -103,7 +104,16 @@ int MTGAllCards::processConfLine(string s, MTGCard *card){
}else if(key.compare("power")==0){
card->setPower (atoi(value.c_str()));
}else if(key.compare("subtype")==0){
card->setSubtype(value);
while (value.size()){
unsigned int found = value.find(" ");
if (found != string::npos){
card->setSubtype(value.substr(0,found));
value = value.substr(found+1);
}else{
card->setSubtype(value);
value = "";
}
}
}else if(key.compare("toughness")==0){
card->setToughness(atoi(value.c_str()));
}else{