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