added menutext overriding to transforms.
castcard-> is now the copied spell x.
This commit is contained in:
@@ -4119,6 +4119,7 @@ public:
|
|||||||
bool removeCreatureSubtypes;
|
bool removeCreatureSubtypes;
|
||||||
bool removeTypes;
|
bool removeTypes;
|
||||||
string menu;
|
string menu;
|
||||||
|
string menutext; //this overrides the previous.
|
||||||
string newpower;
|
string newpower;
|
||||||
bool newpowerfound;
|
bool newpowerfound;
|
||||||
int oldpower;
|
int oldpower;
|
||||||
@@ -4132,7 +4133,7 @@ public:
|
|||||||
bool UYNT;
|
bool UYNT;
|
||||||
int myCurrentTurn;
|
int myCurrentTurn;
|
||||||
|
|
||||||
ATransformer(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target, string stypes, string sabilities,string newpower,bool newpowerfound,string newtoughness,bool newtoughnessfound,vector<string> newAbilitiesList,bool newAbilityFound = false,bool aForever = false ,bool UYNT = false);
|
ATransformer(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target, string stypes, string sabilities,string newpower,bool newpowerfound,string newtoughness,bool newtoughnessfound,vector<string> newAbilitiesList,bool newAbilityFound = false,bool aForever = false ,bool UYNT = false,string menutext = "");
|
||||||
int addToGame();
|
int addToGame();
|
||||||
int reapplyCountersBonus(MTGCardInstance * rtarget= NULL,bool powerapplied=false,bool toughnessapplied=false);
|
int reapplyCountersBonus(MTGCardInstance * rtarget= NULL,bool powerapplied=false,bool toughnessapplied=false);
|
||||||
int testDestroy();
|
int testDestroy();
|
||||||
@@ -4156,8 +4157,9 @@ public:
|
|||||||
bool newAbilityFound;
|
bool newAbilityFound;
|
||||||
bool aForever;
|
bool aForever;
|
||||||
bool UYNT;
|
bool UYNT;
|
||||||
|
string menu;
|
||||||
|
|
||||||
ATransformerInstant(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target, string types = "", string abilities = "",string newpower = "",bool newpowerfound = false,string newtoughness = "",bool newtoughnessfound = false,vector<string>newAbilitiesList = vector<string>(),bool newAbilityFound = false,bool aForever = false, bool UYNT = false);
|
ATransformerInstant(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target, string types = "", string abilities = "",string newpower = "",bool newpowerfound = false,string newtoughness = "",bool newtoughnessfound = false,vector<string>newAbilitiesList = vector<string>(),bool newAbilityFound = false,bool aForever = false, bool UYNT = false,string menutext = "");
|
||||||
int resolve();
|
int resolve();
|
||||||
const char * getMenuText();
|
const char * getMenuText();
|
||||||
ATransformerInstant * clone() const;
|
ATransformerInstant * clone() const;
|
||||||
|
|||||||
@@ -3911,8 +3911,8 @@ AAlterCost::~AAlterCost()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ATransformer
|
// ATransformer
|
||||||
ATransformer::ATransformer(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target, string stypes, string sabilities,string newpower,bool newpowerfound,string newtoughness,bool newtoughnessfound,vector<string> newAbilitiesList,bool newAbilityFound,bool aForever, bool aUntilNext) :
|
ATransformer::ATransformer(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target, string stypes, string sabilities,string newpower,bool newpowerfound,string newtoughness,bool newtoughnessfound,vector<string> newAbilitiesList,bool newAbilityFound,bool aForever, bool aUntilNext,string _menu) :
|
||||||
MTGAbility(observer, id, source, target),newpower(newpower),newpowerfound(newpowerfound),newtoughness(newtoughness),newtoughnessfound(newtoughnessfound),newAbilitiesList(newAbilitiesList),newAbilityFound(newAbilityFound),aForever(aForever),UYNT(aUntilNext)
|
MTGAbility(observer, id, source, target),newpower(newpower),newpowerfound(newpowerfound),newtoughness(newtoughness),newtoughnessfound(newtoughnessfound),newAbilitiesList(newAbilitiesList),newAbilityFound(newAbilityFound),aForever(aForever),UYNT(aUntilNext),menutext(_menu)
|
||||||
{
|
{
|
||||||
|
|
||||||
PopulateAbilityIndexVector(abilities, sabilities);
|
PopulateAbilityIndexVector(abilities, sabilities);
|
||||||
@@ -4227,6 +4227,8 @@ int ATransformer::destroy()
|
|||||||
|
|
||||||
const char * ATransformer::getMenuText()
|
const char * ATransformer::getMenuText()
|
||||||
{
|
{
|
||||||
|
if(menutext.size())
|
||||||
|
return menutext.c_str();
|
||||||
string s = menu;
|
string s = menu;
|
||||||
sprintf(menuText, "Becomes %s", s.c_str());
|
sprintf(menuText, "Becomes %s", s.c_str());
|
||||||
return menuText;
|
return menuText;
|
||||||
@@ -4242,10 +4244,10 @@ ATransformer::~ATransformer()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//ATransformerInstant
|
//ATransformerInstant
|
||||||
ATransformerInstant::ATransformerInstant(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target, string types, string abilities,string newpower,bool newpowerfound,string newtoughness,bool newtoughnessfound,vector<string>newAbilitiesList,bool newAbilityFound,bool aForever,bool aUntilNext) :
|
ATransformerInstant::ATransformerInstant(GameObserver* observer, int id, MTGCardInstance * source, MTGCardInstance * target, string types, string abilities,string newpower,bool newpowerfound,string newtoughness,bool newtoughnessfound,vector<string>newAbilitiesList,bool newAbilityFound,bool aForever,bool aUntilNext,string _menu) :
|
||||||
InstantAbility(observer, id, source, target),newpower(newpower),newpowerfound(newpowerfound),newtoughness(newtoughness),newtoughnessfound(newtoughnessfound),newAbilitiesList(newAbilitiesList),newAbilityFound(newAbilityFound),aForever(aForever),UYNT(aUntilNext)
|
InstantAbility(observer, id, source, target),newpower(newpower),newpowerfound(newpowerfound),newtoughness(newtoughness),newtoughnessfound(newtoughnessfound),newAbilitiesList(newAbilitiesList),newAbilityFound(newAbilityFound),aForever(aForever),UYNT(aUntilNext),menu(_menu)
|
||||||
{
|
{
|
||||||
ability = NEW ATransformer(game, id, source, target, types, abilities,newpower,newpowerfound,newtoughness,newtoughnessfound,newAbilitiesList,newAbilityFound,aForever,aUntilNext);
|
ability = NEW ATransformer(game, id, source, target, types, abilities,newpower,newpowerfound,newtoughness,newtoughnessfound,newAbilitiesList,newAbilityFound,aForever,aUntilNext,_menu);
|
||||||
aType = MTGAbility::STANDARD_BECOMES;
|
aType = MTGAbility::STANDARD_BECOMES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4258,6 +4260,8 @@ int ATransformerInstant::resolve()
|
|||||||
}
|
}
|
||||||
const char * ATransformerInstant::getMenuText()
|
const char * ATransformerInstant::getMenuText()
|
||||||
{
|
{
|
||||||
|
if(menu.size())
|
||||||
|
return menu.c_str();
|
||||||
return ability->getMenuText();
|
return ability->getMenuText();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5479,7 +5483,7 @@ int AACastCard::resolveSpell()
|
|||||||
}
|
}
|
||||||
if (!copy->has(Constants::STORM))
|
if (!copy->has(Constants::STORM))
|
||||||
{
|
{
|
||||||
copy->X = 0;
|
copy->X = _target->X;
|
||||||
copy->castX = copy->X;
|
copy->castX = copy->X;
|
||||||
}
|
}
|
||||||
if(andAbility)
|
if(andAbility)
|
||||||
|
|||||||
@@ -2833,9 +2833,9 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (oneShot || forceUEOT || forceForever)
|
if (oneShot || forceUEOT || forceForever)
|
||||||
return NEW ATransformerInstant(observer, id, card, target, stypes, sabilities,newpower,newpowerfound,newtoughness,newtoughnessfound,newAbilitiesList,newAbilityFound,forceForever,untilYourNextTurn);
|
return NEW ATransformerInstant(observer, id, card, target, stypes, sabilities,newpower,newpowerfound,newtoughness,newtoughnessfound,newAbilitiesList,newAbilityFound,forceForever,untilYourNextTurn,newName);
|
||||||
|
|
||||||
return NEW ATransformer(observer, id, card, target, stypes, sabilities,newpower,newpowerfound,newtoughness,newtoughnessfound,newAbilitiesList,newAbilityFound,forceForever,untilYourNextTurn);
|
return NEW ATransformer(observer, id, card, target, stypes, sabilities,newpower,newpowerfound,newtoughness,newtoughnessfound,newAbilitiesList,newAbilityFound,forceForever,untilYourNextTurn,newName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user