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

(cherry picked from commit c8a993f)
  • Loading branch information
jostephd committed Oct 18, 2019
1 parent 6761c54 commit f8ff9f5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/gui/dialogs/attack_predictions.cpp
Expand Up @@ -185,9 +185,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());
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 f8ff9f5

Please sign in to comment.