summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 66bcf8cc8c..37da54bd34 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1365,8 +1365,12 @@ void melee_attack::player_announce_hit()
std::string melee_attack::player_why_missed()
{
- if ((to_hit + heavy_armour_penalty/2) >= defender->melee_evasion(attacker))
+ if (heavy_armour_penalty > 0
+ && (to_hit + heavy_armour_penalty/2
+ >= defender->melee_evasion(attacker)))
+ {
return "Your armour prevents you from hitting ";
+ }
else
return "You miss ";
}