corrected an issue where basicability modifier was not returning the name but "ability instead..did minor correctsions to some Substr values.
This commit is contained in:
@@ -1515,6 +1515,12 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const char * getMenuText(){
|
||||||
|
return Constants::MTGBasicAbilities[ability];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual ostream& toString(ostream& out) const
|
virtual ostream& toString(ostream& out) const
|
||||||
{
|
{
|
||||||
out << "ABasicAbilityModifier ::: modifier : " << modifier
|
out << "ABasicAbilityModifier ::: modifier : " << modifier
|
||||||
|
|||||||
@@ -529,7 +529,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
found = s.find("alternative ");
|
found = s.find("alternative ");
|
||||||
if (found == 0){
|
if (found == 0){
|
||||||
if (spell && spell->AlternativeWasPaid()){
|
if (spell && spell->AlternativeWasPaid()){
|
||||||
string s1 = s.substr(found+7);
|
string s1 = s.substr(found+12);
|
||||||
return parseMagicLine(s1,id,spell, card);
|
return parseMagicLine(s1,id,spell, card);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -539,7 +539,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
found = s.find("buyback ");
|
found = s.find("buyback ");
|
||||||
if (found == 0){
|
if (found == 0){
|
||||||
if (spell && spell->BuyBackWasPaid()){
|
if (spell && spell->BuyBackWasPaid()){
|
||||||
string s1 = s.substr(found+7);
|
string s1 = s.substr(found+8);
|
||||||
return parseMagicLine(s1,id,spell, card);
|
return parseMagicLine(s1,id,spell, card);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -549,7 +549,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
found = s.find("flashback ");
|
found = s.find("flashback ");
|
||||||
if (found == 0){
|
if (found == 0){
|
||||||
if (spell && spell->FlashBackWasPaid()){
|
if (spell && spell->FlashBackWasPaid()){
|
||||||
string s1 = s.substr(found+7);
|
string s1 = s.substr(found+9);
|
||||||
return parseMagicLine(s1,id,spell, card);
|
return parseMagicLine(s1,id,spell, card);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -559,7 +559,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
found = s.find("retrace ");
|
found = s.find("retrace ");
|
||||||
if (found == 0){
|
if (found == 0){
|
||||||
if (spell && spell->RetraceWasPaid()){
|
if (spell && spell->RetraceWasPaid()){
|
||||||
string s1 = s.substr(found+7);
|
string s1 = s.substr(found+8);
|
||||||
return parseMagicLine(s1,id,spell, card);
|
return parseMagicLine(s1,id,spell, card);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -578,7 +578,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
|||||||
//When...comes into play, choose one...
|
//When...comes into play, choose one...
|
||||||
found = s.find("choice ");
|
found = s.find("choice ");
|
||||||
if (found == 0){
|
if (found == 0){
|
||||||
string s1 = sWithoutTc.substr(found+4);
|
string s1 = sWithoutTc.substr(found+7);
|
||||||
MTGAbility * a1 = parseMagicLine(s1,id,spell, card);
|
MTGAbility * a1 = parseMagicLine(s1,id,spell, card);
|
||||||
if (!a1) return NULL;
|
if (!a1) return NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user