diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 8364dcb33..9e8bddd18 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -1764,8 +1764,9 @@ class AProtectionFrom: public MTGAbility { public: TargetChooser * fromTc; - AProtectionFrom(int id, MTGCardInstance * _source, MTGCardInstance * _target, TargetChooser *fromTc) : - MTGAbility(id, _source, _target), fromTc(fromTc) + string tcstr; + AProtectionFrom(int id, MTGCardInstance * _source, MTGCardInstance * _target, TargetChooser *fromTc,string tcstr) : + MTGAbility(id, _source, _target), fromTc(fromTc),tcstr(tcstr) { } @@ -1783,6 +1784,12 @@ public: return 1; } + const char * getMenuText() + { + sprintf(menuText,"Protection from %s",tcstr.c_str()); + return menuText; + } + AProtectionFrom * clone() const { AProtectionFrom * a = NEW AProtectionFrom(*this); diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 64c90ec47..8d6de9f5c 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2596,7 +2596,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { return NULL; //TODO } - return NEW AProtectionFrom(id, card, target, fromTc); + return NEW AProtectionFrom(id, card, target, fromTc,targets); } return NULL; //TODO }