Merge pull request #59 from titison/fix/AttackBoostDesc

Fix AttackBoosts: Show Ep + Hp Regeneration in Desc
This commit is contained in:
titiger
2015-02-16 21:09:22 +01:00

View File

@@ -306,7 +306,7 @@ string UpgradeTypeBase::getDesc(bool translatedValue) const{
string indent="->"; string indent="->";
Lang &lang= Lang::getInstance(); Lang &lang= Lang::getInstance();
if(getMaxHp() != 0) { if(getMaxHp() != 0 || getMaxHpRegeneration() != 0) {
str += indent+lang.getString("Hp",(translatedValue == true ? "" : "english")) + " +" + intToStr(maxHp); str += indent+lang.getString("Hp",(translatedValue == true ? "" : "english")) + " +" + intToStr(maxHp);
if(maxHpIsMultiplier) { if(maxHpIsMultiplier) {
str += "%"; str += "%";
@@ -315,11 +315,11 @@ string UpgradeTypeBase::getDesc(bool translatedValue) const{
// str += " +" + intToStr(getMaxHpFromBoosts()); // str += " +" + intToStr(getMaxHpFromBoosts());
// } // }
if(getMaxHpRegeneration() != 0) { if(getMaxHpRegeneration() != 0) {
str += " [" + intToStr(maxHpRegeneration); str += " (" + lang.getString("Regeneration",(translatedValue == true ? "" : "english")) + ": +" + intToStr(maxHpRegeneration);
// if(getMaxHpRegenerationFromBoosts() != 0) { // if(getMaxHpRegenerationFromBoosts() != 0) {
// str += " +" + intToStr(getMaxHpRegenerationFromBoosts()); // str += " +" + intToStr(getMaxHpRegenerationFromBoosts());
// } // }
str += "]"; str += ")";
} }
} }
@@ -336,7 +336,7 @@ string UpgradeTypeBase::getDesc(bool translatedValue) const{
// } // }
} }
if(getMaxEp() != 0) { if(getMaxEp() != 0 || getMaxEpRegeneration() != 0) {
if(str != "") { if(str != "") {
str += "\n"; str += "\n";
} }
@@ -350,11 +350,11 @@ string UpgradeTypeBase::getDesc(bool translatedValue) const{
// } // }
if(getMaxEpRegeneration() != 0) { if(getMaxEpRegeneration() != 0) {
str += " [" + intToStr(maxEpRegeneration); str += " (" + lang.getString("Regeneration",(translatedValue == true ? "" : "english")) + ": +" + intToStr(maxEpRegeneration);
// if(getMaxEpRegenerationFromBoosts() != 0) { // if(getMaxEpRegenerationFromBoosts() != 0) {
// str += " +" + intToStr(getMaxEpRegenerationFromBoosts()); // str += " +" + intToStr(getMaxEpRegenerationFromBoosts());
// } // }
str += "]"; str += ")";
} }
} }