diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 5ca46ef11..52ba198e6 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -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 { diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 354d4c4fe..675323d21 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -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) {