Skip to content

Commit

Permalink
Damage Calculations: Consistently use "resistance" and "vulnerability…
Browse files Browse the repository at this point in the history
…" for >100% and <100%

Fixes #2002
  • Loading branch information
jostephd committed Oct 17, 2019
1 parent bdf5421 commit c8a993f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/gui/dialogs/attack_predictions.cpp
Expand Up @@ -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()];
Expand Down

0 comments on commit c8a993f

Please sign in to comment.