- 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
+4 -2
View File
@@ -67,8 +67,10 @@ Damageable * AbilityFactory::parseCollateralTarget(MTGCardInstance * card, strin
int AbilityFactory::parsePowerToughness(string s, int *power, int *toughness){
size_t found = s.find("/");
if (found != string::npos){
size_t start = s.find(":", found - 4);
if (start == string::npos) start = s.find(" ", found - 4);
int search_from = found - 4;
if (search_from < 0) search_from = 0;
size_t start = s.find(':', search_from);
if (start == string::npos) start = s.find(" ", search_from);
if (start == string::npos) start = -1;
*power = atoi(s.substr(start+1,s.size()-found).c_str());
size_t end = s.find(" ",start);