-a few card fixes
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-10 12:15:49 +00:00
parent 21bf3b00bd
commit 27af442cb5
8 changed files with 48 additions and 16 deletions

View File

@@ -133,7 +133,14 @@ TriggeredAbility * AbilityFactory::parseTrigger(string magicText, int id, Spell
// Returns NULL if parsing failed
MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated){
size_t found;
string whitespaces (" \t\f\v\n\r");
found=s.find_last_not_of(whitespaces);
if (found!=string::npos)
s.erase(found+1);
else return NULL;
//TODO This block redundant with calling function
if (!card && spell) card = spell->source;
if (!card) return NULL;