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

@@ -1764,6 +1764,33 @@ public:
}
};
class TrCardExplored: public Trigger
{
public:
bool limitOnceATurn;
int triggeredTurn;
TrCardExplored(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc,bool once = false,bool limitOnceATurn = false) :
Trigger(observer, id, source,once, tc),limitOnceATurn(limitOnceATurn)
{
}
int triggerOnEventImpl(WEvent * event)
{
WEventCardExplored * e = dynamic_cast<WEventCardExplored *> (event);
if (!e) return 0;
if (limitOnceATurn && triggeredTurn == game->turn)
return 0;
if (!tc->canTarget(e->card)) return 0;
triggeredTurn = game->turn;
return 1;
}
TrCardExplored * clone() const
{
return NEW TrCardExplored(*this);
}
};
class TrCardSurveiled: public Trigger
{
public:
@@ -5020,6 +5047,19 @@ public:
AASurveilEvent * clone() const;
~AASurveilEvent();
};
//Explores Event
class AAExploresEvent: public ActivatedAbilityTP
{
public:
MTGCardInstance * card;
AAExploresEvent(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable * _target, ManaCost * _cost = NULL,
int who = TargetChooser::UNSET);
int resolve();
const string getMenuText();
AAExploresEvent * clone() const;
~AAExploresEvent();
};
//Yidaro Counter
class AAAlterYidaroCount: public ActivatedAbilityTP
{