]> granicus.if.org Git - nethack/commitdiff
pull request #708 - logging of first hit
authorPatR <rankin@nethack.org>
Sun, 20 Mar 2022 01:03:01 +0000 (18:03 -0700)
committerPatR <rankin@nethack.org>
Sun, 20 Mar 2022 01:10:12 +0000 (18:10 -0700)
Pull request from entrez:  the log message "hit with a wielded weapon
for first time" for breaking the "never hit with a wielded weapon"
conduct wss being given when hitting with wielded non-weapons.  Since
the conduct remained unbroken in that situation, the 'first hit'
message would be re-logged for subsequent non-weapon hits.  This bug
was not present in initial livelog implementation; it was introduced
by the change to log first-hit before first-kill when those occurred
on the same attack.  Verify that the wielded object is actually a
weapon or weapon-tool when deciding whether to log first-hit event.

Closes #708

doc/fixes3-7-0.txt

index b60534aad649270686135e04d1a02ff37af7ddc1..7f132707f71052e47d0f2d67f9d566ca8f94fe0b 100644 (file)
@@ -1078,6 +1078,10 @@ have com_pager() check for failed nhl_init(); probably can't actually happen
 rearranging first-kill and first-hit gamelog messages to get hit before kill
        ordering resulted in "hit with a wielded weapon for first time" being
        given twice if that hit was delivered via applied polearm
+rearranging the feedback for first-kill and first-hit  introduced a bug by
+       not verifying that the wielded item used to hit was a weapon, giving
+       erroneous event feedback and potentially giving it over and over for
+       other non-weapon hits for as long as never-hit conduct stayed unbroken
 counting "just picked up" items when deciding what pseudo-classes should be
        included for the 'I' command's object class prompt was operating on
        an uninitialized varaible