Damage Calculations: Consistently use "resistance" and "vulnerability" for >100% and <100%

Fixes #2002
This commit is contained in:
josteph 2019-10-17 23:36:44 +00:00
parent bdf5421fd5
commit c8a993f6d9

View file

@ -190,9 +190,17 @@ void attack_predictions::set_data(window& window, const combatant_data& attacker
const int resistance_modifier = defender.unit_.damage_from(*weapon, !attacker.stats_.is_attacker, defender.unit_.get_location(), opp_weapon);
if(resistance_modifier != 100) {
if(attacker.stats_.is_attacker) {
ss << _("Defender resistance vs") << " ";
if(resistance_modifier < 100) {
ss << _("Defender resistance vs") << " ";
} else {
ss << _("Defender vulnerability vs") << " ";
}
} else {
ss << _("Attacker vulnerability vs") << " ";
if(resistance_modifier < 100) {
ss << _("Attacker resistance vs") << " ";
} else {
ss << _("Attacker vulnerability vs") << " ";
}
}
ss << string_table["type_" + weapon->type()];