add custom name for generic reveal
This commit is contained in:
@@ -92,6 +92,7 @@ class GenericRevealAbility : public ActivatedAbility
|
||||
public:
|
||||
string howMany;
|
||||
MTGRevealingCards * ability;
|
||||
string named;
|
||||
GenericRevealAbility(GameObserver* observer, int id, MTGCardInstance * source, Targetable * target, string _howMany);
|
||||
int resolve();
|
||||
const string getMenuText();
|
||||
|
||||
@@ -49,6 +49,7 @@ GenericRevealAbility::GenericRevealAbility(GameObserver* observer, int id, MTGCa
|
||||
ActivatedAbility(observer, id, source, NULL), howMany(_howMany)
|
||||
{
|
||||
this->GetId();
|
||||
named = "";
|
||||
}
|
||||
|
||||
int GenericRevealAbility::resolve()
|
||||
@@ -60,6 +61,8 @@ int GenericRevealAbility::resolve()
|
||||
|
||||
const string GenericRevealAbility::getMenuText()
|
||||
{
|
||||
if(named.size())
|
||||
return named.c_str();
|
||||
return "Reveal Cards";
|
||||
}
|
||||
|
||||
|
||||
@@ -3486,6 +3486,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
GenericRevealAbility * a = NEW GenericRevealAbility(observer, id, card, target, backup);
|
||||
a->oneShot = 1;
|
||||
a->canBeInterrupted = false;
|
||||
a->named = newName;
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user