cleanup: Remove "computeXX" functions and XX variables, these were always returning X/2 in all cases.
Test suite passes
This commit is contained in:
@@ -127,7 +127,6 @@ public:
|
||||
ManaCost * cost;
|
||||
int payResult;
|
||||
int computeX(MTGCardInstance * card);
|
||||
int computeXX(MTGCardInstance * card);
|
||||
Spell(MTGCardInstance* _source);
|
||||
Spell(int id, MTGCardInstance* _source, TargetChooser *_tc, ManaCost * _cost, int payResult);
|
||||
~Spell();
|
||||
|
||||
@@ -36,12 +36,6 @@ public:
|
||||
if (card) return card->X;
|
||||
return 1; //this should only hapen when the ai calls the ability. This is to give it an idea of the "direction" of X (positive/negative)
|
||||
}
|
||||
int computeXX(Spell * spell, MTGCardInstance * card)
|
||||
{
|
||||
if (spell) return spell->computeXX(card);
|
||||
if (card) return card->XX;
|
||||
return 1; //this should only hapen when the ai calls the ability. This is to give it an idea of the "direction" of X (positive/negative)
|
||||
}
|
||||
WParsedInt(int value = 0)
|
||||
{
|
||||
intValue = value;
|
||||
@@ -82,7 +76,7 @@ public:
|
||||
}
|
||||
else if (s == "xx" || s == "XX")
|
||||
{
|
||||
intValue = computeXX(spell, card);
|
||||
intValue = computeX(spell, card) / 2;
|
||||
if(intValue < 0)
|
||||
intValue = 0;
|
||||
}
|
||||
|
||||
@@ -484,7 +484,6 @@ public:
|
||||
int abilityEfficiency(MTGAbility * a, Player * p, int mode = MODE_ABILITY, TargetChooser * tc = NULL,Targetable * target = NULL);
|
||||
int magicText(int id, Spell * spell, MTGCardInstance * card = NULL, int mode = MODE_PUTINTOPLAY, TargetChooser * tc = NULL, MTGGameZone * dest = NULL);
|
||||
static int computeX(Spell * spell, MTGCardInstance * card);
|
||||
static int computeXX(Spell * spell, MTGCardInstance * card);
|
||||
static MTGAbility * getCoreAbility(MTGAbility * a);
|
||||
int destroyAllInPlay(TargetChooser * tc, int bury = 0);
|
||||
int moveAll(TargetChooser * tc, string destinationZone);
|
||||
|
||||
@@ -48,7 +48,6 @@ public:
|
||||
MTGGameZone * currentZone;
|
||||
Pos* view;
|
||||
int X;
|
||||
int XX;
|
||||
int alternateCostPaid[ManaCost::MANA_PAID_WITH_RETRACE + 1];
|
||||
int paymenttype;
|
||||
int castMethod; /* Tells if the card reached its current zone by being cast or not (brought into the zone by an effect). non 0 == cast, 0 == not cast */
|
||||
|
||||
Reference in New Issue
Block a user