refactor Legendary Rule

This commit is contained in:
Anthony Calosa
2017-02-01 09:49:36 +08:00
parent c0afb3b95e
commit 7b0fdcd721
6 changed files with 72 additions and 70 deletions
+9 -9
View File
@@ -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;
};