Fixed Treasure token, added boast trigger event, added new keyword "hascnt" to retrieve the amount of specific counter type on a card (e.g. hascntloyalty).

This commit is contained in:
Vittorio Alfieri
2021-01-24 20:37:14 +01:00
parent f6199719fd
commit 4bdc1fdfe1
7 changed files with 127 additions and 6 deletions

View File

@@ -1224,6 +1224,10 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell
if (TargetChooser * tc = parseSimpleTC(s, "mutated", card))
return NEW TrCardMutated(observer, id, card, tc, once, limitOnceATurn);
//boast has been performed from a card
if (TargetChooser * tc = parseSimpleTC(s, "boasted", card))
return NEW TrCardBoasted(observer, id, card, tc, once, limitOnceATurn);
//Surveil has been performed from a card
if (TargetChooser * tc = parseSimpleTC(s, "surveiled", card))
return NEW TrCardSurveiled(observer, id, card, tc, once, limitOnceATurn);
@@ -3555,6 +3559,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
card->mutation += atoi(splitMutatedUnder[1].c_str());
}
//perform boast
found = s.find("doboast");
if (found != string::npos)
{
Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AABoastEvent(observer, id, card, t, NULL, who);
a->oneShot = 1;
return a;
}
//perform surveil
found = s.find("surveil");
if (found != string::npos)