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:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user