added menutext returns for "protection from("

This commit is contained in:
omegablast2002@yahoo.com
2011-02-27 16:09:26 +00:00
parent d8450548c7
commit 2153a8d308
2 changed files with 10 additions and 3 deletions
+9 -2
View File
@@ -1764,8 +1764,9 @@ class AProtectionFrom: public MTGAbility
{ {
public: public:
TargetChooser * fromTc; TargetChooser * fromTc;
AProtectionFrom(int id, MTGCardInstance * _source, MTGCardInstance * _target, TargetChooser *fromTc) : string tcstr;
MTGAbility(id, _source, _target), fromTc(fromTc) 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; return 1;
} }
const char * getMenuText()
{
sprintf(menuText,"Protection from %s",tcstr.c_str());
return menuText;
}
AProtectionFrom * clone() const AProtectionFrom * clone() const
{ {
AProtectionFrom * a = NEW AProtectionFrom(*this); AProtectionFrom * a = NEW AProtectionFrom(*this);
+1 -1
View File
@@ -2596,7 +2596,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
{ {
return NULL; //TODO return NULL; //TODO
} }
return NEW AProtectionFrom(id, card, target, fromTc); return NEW AProtectionFrom(id, card, target, fromTc,targets);
} }
return NULL; //TODO return NULL; //TODO
} }