refactor Legendary Rule
This commit is contained in:
@@ -250,6 +250,7 @@ public:
|
||||
int getCurrentToughness();
|
||||
int LKIpower;
|
||||
int LKItoughness;
|
||||
int countDuplicateCardNames();
|
||||
void cdaPT(int p = 0, int t = 0);
|
||||
bool isCDA;
|
||||
void switchPT(bool apply = false);
|
||||
|
||||
@@ -423,19 +423,19 @@ public:
|
||||
};
|
||||
|
||||
/*
|
||||
* Rule 420.5e (Legend Rule)
|
||||
* If two or more legendary permanents with the same name are in play, all are put into their
|
||||
* owners' graveyards. This is called the "legend rule." If only one of those permanents is
|
||||
* legendary, this rule doesn't apply.
|
||||
* 704.5k If a player controls two or more legendary permanents with the same name,
|
||||
* that player chooses one of them, and the rest are put into their owners’ graveyards.
|
||||
* This is called the “legend rule.”
|
||||
*/
|
||||
class MTGLegendRule: public ListMaintainerAbility
|
||||
class MTGLegendRule: public PermanentAbility
|
||||
{
|
||||
public:
|
||||
TargetChooser * tcL;
|
||||
MTGAbility * Legendrule;
|
||||
MTGAbility * LegendruleAbility;
|
||||
MTGAbility * LegendruleGeneric;
|
||||
MTGLegendRule(GameObserver* observer, int _id);
|
||||
int canBeInList(MTGCardInstance * card);
|
||||
int added(MTGCardInstance * card);
|
||||
int removed(MTGCardInstance * card);
|
||||
int testDestroy();
|
||||
int receiveEvent(WEvent * event);
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
virtual MTGLegendRule * clone() const;
|
||||
};
|
||||
|
||||
@@ -79,6 +79,11 @@ struct WEventDamageStackResolved : public WEvent {
|
||||
WEventDamageStackResolved();
|
||||
};
|
||||
|
||||
|
||||
struct WEventGameStateBasedChecked : public WEvent {
|
||||
WEventGameStateBasedChecked();
|
||||
};
|
||||
|
||||
struct WEventPhasePreChange : public WEvent {
|
||||
Phase * from;
|
||||
Phase * to;
|
||||
|
||||
Reference in New Issue
Block a user