fix token names with ","

This commit is contained in:
Anthony Calosa
2016-08-08 10:15:50 +08:00
parent bf2cc36719
commit 65ef1f384c

View File

@@ -2394,7 +2394,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
string tokenDesc = splitToken[1];
vector<string> tokenParameters = split(tokenDesc, ',');
//lets try finding a token by card name.
if (splitToken[1].size() && tokenParameters.size() ==1)
if (splitToken[1].size() && tokenParameters.size() <3)//names with "," should work like token(Akuta, Born of Ash)
{
string cardName = splitToken[1];
MTGCard * safetycard = MTGCollection()->getCardByName(cardName);