Improved explores ability, added new trigger to handle the explores event from a card, added/fixed primitives from older sets, fixed RIX dat file.

This commit is contained in:
Vittorio Alfieri
2020-12-20 23:14:44 +01:00
parent e67078355a
commit a801069a3a
10 changed files with 735 additions and 80 deletions

View File

@@ -1222,6 +1222,10 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell
if (TargetChooser * tc = parseSimpleTC(s, "surveiled", card))
return NEW TrCardSurveiled(observer, id, card, tc, once, limitOnceATurn);
//Esplores has been performed from controller
if (TargetChooser * tc = parseSimpleTC(s, "explored", card))
return NEW TrCardExplored(observer, id, card, tc, once, limitOnceATurn);
//Roll die has been performed from a card
if (TargetChooser * tc = parseSimpleTC(s, "dierolled", card)){
int rollresult = 0;
@@ -3474,6 +3478,16 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return a;
}
//perform explores
found = s.find("explores");
if (found != string::npos)
{
Targetable * t = spell ? spell->getNextTarget() : NULL;
MTGAbility * a = NEW AAExploresEvent(observer, id, card, t, NULL, who);
a->oneShot = 1;
return a;
}
//set surveil offset controller (eg. Enhanced Surveillance)
vector<string> splitSurveilOffset = parseBetween(s, "altersurvoffset:", " ", false);
if (splitSurveilOffset.size())