Partial fix for Cards with Bestow

missing was to seperate the mode as aura enchantment or enchantment
creature when cast and update the cost
This commit is contained in:
Anthony Calosa
2017-03-13 13:32:43 +08:00
parent 87ae60f323
commit d6a0b04930
10 changed files with 142 additions and 13 deletions
+20
View File
@@ -3196,6 +3196,26 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
//Extra for Bestow
vector<string> splitAuraIncreaseReduce = parseBetween(s, "modbenchant(", ")", true);
if(splitAuraIncreaseReduce.size())
{
if(splitAuraIncreaseReduce[1].size())
{
Damageable * t = spell ? spell->getNextDamageableTarget() : NULL;
vector<string> ccParameters = split( splitAuraIncreaseReduce[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 AAuraIncreaseReduce(observer, id, card, t, amount, color, who);
return a;
}
}
}
//set hand size
vector<string> splitSetHand = parseBetween(s, "sethand:", " ", false);
if (splitSetHand.size())