added gatecrash "evole" mechanic.

auto=evole
This commit is contained in:
omegablast2002@yahoo.com
2012-12-24 16:19:32 +00:00
parent 2b4df1cc68
commit 651d0b4623
2 changed files with 33 additions and 0 deletions

View File

@@ -5263,6 +5263,33 @@ public:
}
};
//Evole ability
class AEvoleAbility: public MTGAbility
{
public:
AEvoleAbility(GameObserver* observer, int _id, MTGCardInstance * _source) :
MTGAbility(observer, _id, _source)
{
}
int receiveEvent(WEvent * event)
{
WEventZoneChange * enters = (WEventZoneChange *) event;
if (enters->to == game->currentlyActing()->game->inPlay && game->currentlyActing() == source->controller() && enters->card->isCreature())
{
if(enters->card != source && (enters->card->power > source->power || enters->card->toughness > source->toughness))
{
source->counters->addCounter(1,1);
}
}
return 1;
}
AEvoleAbility * clone() const
{
return NEW AEvoleAbility(*this);
}
};
//flanking ability
class AFlankerAbility: public MTGAbility
{

View File

@@ -2284,6 +2284,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return NEW ARampageAbility(observer, id, card, power, toughness, MaxOpponent);
}
//evole
if (s.find("evole") != string::npos)
{
return NEW AEvoleAbility(observer, id, card);
}
//flanking
if (s.find("flanker") != string::npos)
{