tidy up attack menu

This commit is contained in:
Anthony Calosa
2017-03-02 21:46:29 +08:00
parent dcbe0c40b0
commit 78bfa604e2
4 changed files with 63 additions and 20 deletions

View File

@@ -161,12 +161,14 @@ public:
MTGCardInstance * defenser;
list<MTGCardInstance *>blockers;
int attacker;
int willattackplayer;
int willattackpw;
int toggleDefenser(MTGCardInstance * opponent);
int raiseBlockerRankOrder(MTGCardInstance * blocker);
//Returns rank of the card in blockers if it is a blocker of this (starting at 1), 0 otherwise
int getDefenserRank(MTGCardInstance * blocker);
int toggleAttacker();
int toggleAttacker(bool pw = false);
MTGCardInstance * banding; // If belongs to a band when attacking
int canBlock();
int canBlock(MTGCardInstance * opponent);

View File

@@ -270,17 +270,14 @@ public:
class MTGAttackRule: public PermanentAbility, public Limitor
{
public:
string attackmenu;
virtual bool select(Target*);
virtual bool greyout(Target*);
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
int reactToClick(MTGCardInstance * card);
virtual ostream& toString(ostream& out) const;
MTGAttackRule(GameObserver* observer, int _id);
const string getMenuText()
{
return "Attacker";
}
const string getMenuText();
int receiveEvent(WEvent * event);
virtual MTGAttackRule * clone() const;
};
@@ -289,16 +286,13 @@ public:
class MTGPlaneswalkerAttackRule: public PermanentAbility, public Limitor
{
public:
string attackpwmenu;
virtual bool select(Target*);
virtual bool greyout(Target*);
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
int reactToClick(MTGCardInstance * card);
MTGPlaneswalkerAttackRule(GameObserver* observer, int _id);
const string getMenuText()
{
return "Attack Planeswalker";
}
const string getMenuText();
virtual MTGPlaneswalkerAttackRule * clone() const;
};
class AAPlaneswalkerAttacked: public InstantAbility