Viewing Issue Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0011749 [DCSS] Bug Report minor always 2018-11-05 03:45 2022-01-06 03:14
Reporter minmay View Status public  
Assigned To Kate
Priority normal Resolution done Local or Remote Both
Status resolved   Operating System All
Projection none   Console or Tiles Both
ETA none Fixed in Branch longterm development (0.31+) Product Branch 0.23 ancient branch
  Product Version
Summary 0011749: "Your [armour/shield] prevents you from hitting the foo" incorrect
Description melee_attack::player_why_missed() gives you this message if your to-hit is lower than the target's EV and your to-hit plus your armour/shield penalty is greater than or equal to the target's EV.

This message is usually wrong, for several reasons:
1. The armour/shield penalty is deducted from your to-hit prior to the maybe_random2() call that, on average, more than halves to-hit. So player_why_missed() is pretending that the armour/shield penalties are more than twice as impactful as they actually are. So in the majority of cases where you get this message, your to-hit would have still been lower than the target's EV even without the penalties.
2. Even if the correct armour/shield penalty values were used, having a to-hit greater than or equal to the target's EV does not ensure that the attack will hit. There is a 2.5% chance of missing anyway.
3. Even if the correct armour/shield penalty values were used, having a to-hit less than the target's EV does not ensure that the attack will miss. There is a 2.5% chance of hitting anyway.

The result is that unspoiled players are misled about the severity of armour/shield accuracy penalties.
Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0032785)
NormalPerson7 (reporter)
2018-11-05 20:01
edited on: 2018-11-05 20:02

player_why_missed describes why an attack, that has just been calculated to miss the enemy, has missed. Therefore the 2.5% chances have already been rolled. For this reason, there is a simple fix for point 2 (add a check for if(ev_margin<=-AUTOMATIC_HIT) at the start of the method), and point 3 has no effect because if the attack has rolled the 2.5% chance to hit anyway, this method will not be called.

You are very much correct with point 1; I think we have all been severely misled by this.

(0034387)
PleasingFungus (administrator)
2021-11-02 16:49

6f86257384905e1e50639bcbe62e6ee20c40e4d8 should more or less address point 1. Haven't thought about point 2 yet.
(0034391)
Kate (developer)
2022-01-06 03:14

This is fixed by 4f6bc678f.

- Issue History
Date Modified Username Field Change
2018-11-05 03:45 minmay New Issue
2018-11-05 20:01 NormalPerson7 Note Added: 0032785
2018-11-05 20:02 NormalPerson7 Note Edited: 0032785
2018-11-08 13:18 TAS2012 Issue Monitored: TAS2012
2021-11-02 16:49 PleasingFungus Note Added: 0034387
2022-01-06 03:14 Kate Note Added: 0034391
2022-01-06 03:14 Kate Status new => resolved
2022-01-06 03:14 Kate Fixed in Branch => longterm development (0.28+)
2022-01-06 03:14 Kate Resolution open => done
2022-01-06 03:14 Kate Assigned To => Kate


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker