removed farmstead hardcode, this card can now be soft coded
This commit is contained in:
@@ -4512,57 +4512,6 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//1345 Farmstead
|
|
||||||
class AFarmstead: public ActivatedAbility
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
int usedThisTurn;
|
|
||||||
AFarmstead(GameObserver* observer, int _id, MTGCardInstance * source, MTGCardInstance * _target) :
|
|
||||||
ActivatedAbility(observer, _id, source, 0, 1)
|
|
||||||
{
|
|
||||||
std::vector<int16_t> _cost;
|
|
||||||
_cost.push_back(Constants::MTG_COLOR_WHITE);
|
|
||||||
_cost.push_back(2);
|
|
||||||
setCost(NEW ManaCost(_cost, 1), true);
|
|
||||||
target = _target;
|
|
||||||
usedThisTurn = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update(float dt)
|
|
||||||
{
|
|
||||||
if (newPhase != currentPhase && newPhase != MTG_PHASE_UPKEEP)
|
|
||||||
{
|
|
||||||
usedThisTurn = 0;
|
|
||||||
}
|
|
||||||
ActivatedAbility::Update(dt);
|
|
||||||
}
|
|
||||||
|
|
||||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL)
|
|
||||||
{
|
|
||||||
if (!ActivatedAbility::isReactingToClick(card, mana)) return 0;
|
|
||||||
if (currentPhase != MTG_PHASE_UPKEEP) return 0;
|
|
||||||
if (usedThisTurn) return 0;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int resolve()
|
|
||||||
{
|
|
||||||
source->controller()->life++;
|
|
||||||
usedThisTurn = 1;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ostream& toString(ostream& out) const
|
|
||||||
{
|
|
||||||
out << "AFarmstead ::: usedThisTurn : " << usedThisTurn << " (";
|
|
||||||
return ActivatedAbility::toString(out) << ")";
|
|
||||||
}
|
|
||||||
AFarmstead * clone() const
|
|
||||||
{
|
|
||||||
return NEW AFarmstead(*this);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//Kjeldoran Frostbeast
|
//Kjeldoran Frostbeast
|
||||||
class AKjeldoranFrostbeast: public MTGAbility
|
class AKjeldoranFrostbeast: public MTGAbility
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3511,11 +3511,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 1345: //Farmstead
|
|
||||||
{
|
|
||||||
observer->addObserver(NEW AFarmstead(observer, _id, card, card->target));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1291: //Fireball
|
case 1291: //Fireball
|
||||||
{
|
{
|
||||||
int x = computeX(spell, card);
|
int x = computeX(spell, card);
|
||||||
@@ -3551,11 +3546,6 @@ void AbilityFactory::addAbilities(int _id, Spell * spell)
|
|||||||
observer->addObserver(NEW AJandorsRing(observer, _id, card));
|
observer->addObserver(NEW AJandorsRing(observer, _id, card));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1254: //Kudzu
|
|
||||||
{
|
|
||||||
observer->addObserver(NEW AKudzu(observer, id, card, card->target));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1257: //Lifelace
|
case 1257: //Lifelace
|
||||||
{
|
{
|
||||||
if (card->target)
|
if (card->target)
|
||||||
|
|||||||
Reference in New Issue
Block a user