Revert my Graphic changes
I think it's the one who cause those crashes
This commit is contained in:
@@ -2416,7 +2416,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() <3)
|
||||
if (splitToken[1].size() && (tokenParameters.size() ==1||tokenParameters.size() ==2))
|
||||
{
|
||||
string cardName = splitToken[1];
|
||||
MTGCard * safetycard = MTGCollection()->getCardByName(cardName);
|
||||
@@ -3396,6 +3396,25 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
return a;
|
||||
}
|
||||
|
||||
//changecost - alternate for altercost
|
||||
vector<string> splitChangeCost = parseBetween(s, "changecost(", ")", true);
|
||||
if(splitChangeCost.size())
|
||||
{
|
||||
if(splitChangeCost[1].size())
|
||||
{
|
||||
vector<string> ccParameters = split( splitChangeCost[1], ':');
|
||||
int amount = atoi(ccParameters[1].c_str());
|
||||
int color = Constants::GetColorStringIndex(ccParameters[0]);
|
||||
if(ccParameters[0] == "colorless")
|
||||
color = 0;
|
||||
if(ccParameters[0].size() && ccParameters[1].size())
|
||||
{
|
||||
MTGAbility * a = NEW AAlterCost(observer, id, card, target, amount, color);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Change Power/Toughness
|
||||
WParsedPT * wppt = NEW WParsedPT(s, spell, card);
|
||||
bool nonstatic = false;
|
||||
|
||||
Reference in New Issue
Block a user