diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index dac3b43fc..892da7efe 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -2255,6 +2255,9 @@ public: return 1; } + const char * getMenuText(){ + return "Exalted"; + } AExalted * clone() const{ AExalted * a = NEW AExalted(*this); @@ -2935,11 +2938,11 @@ public: }; /* switch power and toughness of target */ -class ATwist:public InstantAbility{ +class ASwapPT:public InstantAbility{ public: int oldpower; int oldtoughness; - ATwist(int _id, MTGCardInstance * _source, MTGCardInstance * _target): InstantAbility(_id, _source, _target){ + ASwapPT(int _id, MTGCardInstance * _source, MTGCardInstance * _target): InstantAbility(_id, _source, _target){ target = _target; } @@ -2974,10 +2977,10 @@ public: } const char * getMenuText(){ - return "Switch"; + return "Swap power and toughness"; } - ATwist * clone() const{ - ATwist * a = NEW ATwist(*this); + ASwapPT * clone() const{ + ASwapPT * a = NEW ASwapPT(*this); a->isClone = 1; return a; } @@ -3299,6 +3302,11 @@ public: } return 1; } + + const char * getMenuText(){ + return "Transform"; + } + ATransformer * clone() const{ ATransformer * a = NEW ATransformer(*this); a->isClone = 1; @@ -3349,6 +3357,11 @@ public: } return MTGAbility::addToGame(); } + + const char * getMenuText(){ + return "Transform"; + } + AForeverTransformer * clone() const{ AForeverTransformer * a = NEW AForeverTransformer(*this); a->isClone = 1; @@ -3366,6 +3379,9 @@ public: GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a); wrapper->addToGame(); return 1;} + const char * getMenuText(){ + return "Transform"; + } ATransformerUEOT * clone() const{ ATransformerUEOT * a = NEW ATransformerUEOT(*this); a->ability = this->ability->clone(); @@ -3379,38 +3395,47 @@ public: public: AForeverTransformer * ability; ATransformerFOREVER(int id, MTGCardInstance * source, MTGCardInstance * target, string types, string abilities):InstantAbility(id,source,target){ - ability = NEW AForeverTransformer(id,source,target,types,abilities);} + ability = NEW AForeverTransformer(id,source,target,types,abilities); + } int resolve(){ AForeverTransformer * a = ability->clone(); GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a); wrapper->addToGame(); - return 1;} + return 1; + } + const char * getMenuText(){ + return "Transform"; + } ATransformerFOREVER * clone() const{ ATransformerFOREVER * a = NEW ATransformerFOREVER(*this); a->ability = this->ability->clone(); a->isClone = 1; - return a;} + return a; + } ~ATransformerFOREVER(){delete ability; }}; //switch p/t ueot - class ATwistUEOT: public InstantAbility{ + class ASwapPTUEOT: public InstantAbility{ public: - ATwist * ability; - ATwistUEOT(int id, MTGCardInstance * source, MTGCardInstance * target):InstantAbility(id,source,target){ - ability = NEW ATwist(id,source,target);} + ASwapPT * ability; + ASwapPTUEOT(int id, MTGCardInstance * source, MTGCardInstance * target):InstantAbility(id,source,target){ + ability = NEW ASwapPT(id,source,target); + } int resolve(){ - ATwist * a = ability->clone(); + ASwapPT * a = ability->clone(); GenericInstantAbility * wrapper = NEW GenericInstantAbility(1,source,(Damageable *)(this->target),a); wrapper->addToGame(); - return 1;} - ATwistUEOT * clone() const{ - ATwistUEOT * a = NEW ATwistUEOT(*this); + return 1; + } + ASwapPTUEOT * clone() const{ + ASwapPTUEOT * a = NEW ASwapPTUEOT(*this); a->ability = this->ability->clone(); a->isClone = 1; return a;} - ~ATwistUEOT(){ + ~ASwapPTUEOT(){ delete ability; - }}; + } + }; //becomes ability //Adds types/abilities/P/T to a card (aura) diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index aab61fb75..517816ab9 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -138,7 +138,7 @@ class Constants CONTROLLERSHROUD = 80, SUNBURST = 81, FLANKING = 82, - EXILEBURY = 83, + EXILEDEATH = 83, NB_BASIC_ABILITIES = 84, diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index b00b0ad65..8f11b301a 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1336,15 +1336,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG } return NULL; } -// the following is NOT dead code. this is for stacking flanking. except auras do not yet support - //giving creatures activated/MTGAbility keywords. soon as i add this support this will be uncommented for stacking flanking. - // //flanking - // found = s.find("flanking"); - // if (found != string::npos){ - // return NEW AFlankerAbility(id,card); - //} - //bushido + //bushido found = s.find("bushido("); if (found != string::npos){ int end = s.find(")", found); @@ -1593,9 +1586,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG } //switch targest power with toughness - found = s.find("twist"); + found = s.find("swap"); if (found != string::npos){ - MTGAbility * a = NEW ATwistUEOT(id,card,target); + MTGAbility * a = NEW ASwapPTUEOT(id,card,target); a->oneShot = 1; return a; } @@ -1644,7 +1637,7 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ if (dynamic_cast(a)) return BAKA_EFFECT_BAD; if (dynamic_cast(a)) return BAKA_EFFECT_GOOD; if (dynamic_cast(a)) return BAKA_EFFECT_GOOD; - if (dynamic_cast(a)) return BAKA_EFFECT_BAD; + if (dynamic_cast(a)) return BAKA_EFFECT_BAD; if (dynamic_cast(a)) return BAKA_EFFECT_GOOD; if (dynamic_cast(a)) return BAKA_EFFECT_BAD; if (AACounter * ac = dynamic_cast(a)) { diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index e35be4182..53f5a8381 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -191,7 +191,7 @@ int MTGCardInstance::afterDamage(){ int MTGCardInstance::bury(){ Player * p = controller(); - if (basicAbilities[Constants::EXILEBURY]){ + if (basicAbilities[Constants::EXILEDEATH]){ p->game->putInZone(this,p->game->inPlay,owner->game->exile); return 1; }