Opened 11 years ago
Closed 10 years ago
#498 closed bug (fixed (in master))
Average damage not correct for items in pack [Was: Number of blows not always correct]
Reported by: | CunningGabe | Owned by: | |
---|---|---|---|
Milestone: | 3.1.0 | Keywords: | blocker |
Cc: |
Description
My unmodified strength is currently 18/134 and dex is 18/67. I'm currently wearing a Spear of Westernesse (+2) which boosts this to 18/154 and 18/87 and gives me 4 blows. While wearing the Spear of Westernesse, if I look at another weapon (The Morning Star 'Bllodspike') to see how many blows it will give me, the number is inflated because it is taking my modified strength and dex into account (Bloodspike gives +4 STR and no DEX bonus.) Blow-calculation should take into account the fact that I have to unwield whatever weapon I'm currently wielding.
Attachments (2)
Change History (14)
comment:1 Changed 11 years ago by GabeCunningham
comment:2 Changed 11 years ago by GabeCunningham
- Summary changed from Number of blows not always correct to Average damage not correct for items in pack [Was: Number of blows not always correct]
comment:3 Changed 11 years ago by takkaria
- Keywords blocker added
comment:4 Changed 10 years ago by takkaria
- Resolution set to fixed
- Status changed from new to closed
in [b09ee71] (SVN r1000).
comment:5 follow-up: ↓ 7 Changed 10 years ago by Big Al
- Resolution fixed deleted
- Status changed from closed to reopened
This still seems to be broken - in shops at least. Eg. the weapon shop is selling:
- a Lucerne Hammer (2d5) (+0, +0)
- a Lucerne Hammer (2d5) (+3, +3)
and they both show "averaging a damage of 9 against normal creatures." The latter should be 12 damage I believe.
comment:6 Changed 10 years ago by CunningGabe
It seems to me that the average damage isn't taking into account the bonuses of the weapon - I have a Dagger (1d4) (+6, +4) and an inherent +2 to damage, and when I examine it, it claims my average damage is 4.5 per blow. This is just the 2.5 average +2 from my own bonus. I don't get the correct figure whether I'm wielding the dagger or not.
Changed 10 years ago by anonymous
comment:7 in reply to: ↑ 5 Changed 10 years ago by anonymous
I seem to have fixed it.
comment:8 Changed 10 years ago by takkaria
- Resolution set to fixed
- Status changed from reopened to closed
fixed in [b4f50c3] (SVN r1028).
comment:9 Changed 10 years ago by Big Al
- Resolution fixed deleted
- Status changed from closed to reopened
Still broken, sorry - now it shows you the average damage as if the weapon was identified. E.g. I find a 1d4 dagger and wield it. It tells me I will do an average damage of 10.5. I can figure out the +todam of the weapon in this case without identifying it: 10.5 - 2.5 (for base 1d4 damage) - 3 (STR bonus) = +5 todam.
comment:10 Changed 10 years ago by takkaria
- Resolution set to fixed
- Status changed from reopened to closed
in [d702662] (SVN r1046), thanks
comment:11 Changed 10 years ago by Big Al
- Resolution fixed deleted
- Status changed from closed to reopened
In [d702662] (SVN r1046),
xtra_dam = (state.dis_to_d + o_ptr->to_d) * 10;
was changed to:
xtra_dam = state.dis_to_d; if (object_known_p(o_ptr)) xtra_dam += o_ptr->to_d * 10;
Shouldn't this be:
xtra_dam = state.dis_to_d * 10; if (object_known_p(o_ptr)) xtra_dam += o_ptr->to_d * 10;
A quick debug-mode char test shows that a 1d4 (+0, +0) dagger and an identified (+0, +50) ring of damage does 7.5 damage per blow, not 52.5. The x10 multiplier seems to have been removed from the patch d_m made.
comment:12 Changed 10 years ago by takkaria
- Resolution set to fixed
- Status changed from reopened to closed
fixed in [5be6498] (SVN r1073). That's what I get for applying patches by hand!
[c22597c] (SVN r753) mostly fixed this. The number of blows should always be correct now, but the average damage still needs to be fixed.