Crew Ability Cost & Crewbonus

Revised cards to use {crew(targetchooser)} (modified taptargetcost) so
it can use crewbonus ability from other creatures.
This commit is contained in:
Anthony Calosa
2017-02-01 17:11:55 +08:00
parent c8dc416071
commit ea5e397595
10 changed files with 144 additions and 72 deletions
+10
View File
@@ -875,6 +875,16 @@ private:
else
intValue = 0;
}
else if (s == "crewtotalpower")//crew count total power
{
intValue = 0;
for (int j = card->controller()->game->battlefield->nb_cards - 1; j >= 0; --j)
{
MTGCardInstance * crew = card->controller()->game->battlefield->cards[j];
if (crew != card && crew->isCreature() && !crew->isTapped() && !crew->has(Constants::CANTCREW))
intValue += crew->power;
}
}
else if (s == "pancientooze")//Ancient Ooze
{
intValue = 0;
+3
View File
@@ -74,6 +74,9 @@ public:
string AICustomCode;
void setAICustomCode(const string& value);
const string& getAICustomCode() const;
string CrewAbility;
void setCrewAbility(const string& value);
const string& getCrewAbility() const;
vector<int>types;
CardPrimitive();
+2 -1
View File
@@ -244,7 +244,8 @@ public:
class TapTargetCost : public ExtraCost
{
public:
TapTargetCost(TargetChooser *_tc = NULL);
bool crew;
TapTargetCost(TargetChooser *_tc = NULL, bool crew = false);
virtual int isPaymentSet();
virtual int doPay();
virtual TapTargetCost * clone() const;