added gatecrash "evole" mechanic.
auto=evole
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user