|
@@ -606,16 +606,16 @@ std::string CStackInstance::bonusToString(Bonus *bonus, bool description) const
|
|
|
boost::algorithm::replace_first(text, "%d", boost::lexical_cast<std::string>(valOfBonuses(Selector::typeSubtype(bonus->type, bonus->subtype))));
|
|
|
break;
|
|
|
//Complex descriptions
|
|
|
- case Bonus::SECONDARY_SKILL_PREMY: //only if there's no simple MR
|
|
|
- if (bonus->subtype == CGHeroInstance::RESISTANCE)
|
|
|
- {
|
|
|
- if (!hasBonusOfType(Bonus::MAGIC_RESISTANCE))
|
|
|
- boost::algorithm::replace_first(text, "%d", boost::lexical_cast<std::string>( magicResistance() ));
|
|
|
- }
|
|
|
- break;
|
|
|
- case Bonus::MAGIC_RESISTANCE:
|
|
|
- boost::algorithm::replace_first(text, "%d", boost::lexical_cast<std::string>( magicResistance() ));
|
|
|
- break;
|
|
|
+ //case Bonus::SECONDARY_SKILL_PREMY: //only if there's no simple MR
|
|
|
+ // if (bonus->subtype == CGHeroInstance::RESISTANCE)
|
|
|
+ // {
|
|
|
+ // if (!hasBonusOfType(Bonus::MAGIC_RESISTANCE))
|
|
|
+ // boost::algorithm::replace_first(text, "%d", boost::lexical_cast<std::string>( magicResistance() ));
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ //case Bonus::MAGIC_RESISTANCE:
|
|
|
+ // boost::algorithm::replace_first(text, "%d", boost::lexical_cast<std::string>( magicResistance() ));
|
|
|
+ // break;
|
|
|
case Bonus::HATE:
|
|
|
boost::algorithm::replace_first(text, "%d", boost::lexical_cast<std::string>(valOfBonuses(Selector::typeSubtype(bonus->type, bonus->subtype))));
|
|
|
boost::algorithm::replace_first(text, "%s", VLC->creh->creatures[bonus->subtype]->namePl);
|
|
@@ -658,10 +658,13 @@ std::string CStackInstance::bonusToString(Bonus *bonus, bool description) const
|
|
|
case Bonus::SPELL_IMMUNITY:
|
|
|
boost::algorithm::replace_first(text, "%s", VLC->spellh->spells[bonus->subtype]->name);
|
|
|
break;
|
|
|
- case Bonus::SECONDARY_SKILL_PREMY:
|
|
|
- if (bonus->subtype != CGHeroInstance::RESISTANCE || hasBonusOfType(Bonus::MAGIC_RESISTANCE)) //handle it there
|
|
|
- text = "";
|
|
|
+ case Bonus::MAGIC_RESISTANCE:
|
|
|
+ text = ""; //handled separately
|
|
|
break;
|
|
|
+ //case Bonus::SECONDARY_SKILL_PREMY:
|
|
|
+ // if (bonus->subtype != CGHeroInstance::RESISTANCE || hasBonusOfType(Bonus::MAGIC_RESISTANCE)) //handle it there
|
|
|
+ // text = "";
|
|
|
+ // break;
|
|
|
}
|
|
|
}
|
|
|
return text;
|