From aae7778d663ea5da9ad56ce3f0f0579c53f63fe4 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 23 Dec 2025 23:28:58 -0800 Subject: [PATCH] github issue #1472 - elven monster bow bonus Issue reported by Tomsod: monster elves were intended to get a small bonus to to-hit and damage when shooting arrows with bows, but the check for that tested the arrows for skill P_BOW which never matches. It should be -P_BOW. [Pretty minor: +1 to-hit for any bow, another +1 to-hit if elven bow; +1 damage for elven arrow; against hero and against other monsters.] Fixes #1472 --- doc/fixes3-7-0.txt | 2 ++ src/mthrowu.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 6a70bf195..8790b59c3 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1555,6 +1555,8 @@ dumplogs include spells and skills praying will not restore monster-form HP while polymorphed, unless you have unchanging winter wolf cub was missing for monster to lycanthrope conversion +monster elves shooting arrows weren't getting intended small to-hit and damage + bonuses Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/mthrowu.c b/src/mthrowu.c index e19ca4ce9..613150656 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -698,8 +698,9 @@ m_throw( hitv = 3 - distmin(u.ux, u.uy, mon->mx, mon->my); if (hitv < -4) hitv = -4; + /* [elves get a shooting bonus, orcs don't...] */ if (is_elf(mon->data) - && objects[singleobj->otyp].oc_skill == P_BOW) { + && objects[singleobj->otyp].oc_skill == -P_BOW) { hitv++; if (MON_WEP(mon) && MON_WEP(mon)->otyp == ELVEN_BOW) hitv++;