]> granicus.if.org Git - nethack/commitdiff
Allow nurses heal attack when wielding a non-weapon/weaptool
authorPatric Mueller <bhaak@gmx.net>
Wed, 22 Apr 2020 09:47:14 +0000 (11:47 +0200)
committerPatric Mueller <bhaak@gmx.net>
Wed, 22 Apr 2020 10:00:06 +0000 (12:00 +0200)
This matches the nurses' hitting behavior with their chatting messages.

Chatting to them suggested that the heal attack would happen but the check in
mhitu.c was just for wielding anything.

This opens up the possibility of a YAFM in MS_NURSE when wielding something
that allos the heal attack to proceed.  But I couldn't come up with a good
one.

doc/fixes37.0
src/mhitu.c

index cb409af8d0dc989507dd8399d549e0cefd238e6e..54e800a04f6a0cee468d00ec5999ff5c2ac5e7f4 100644 (file)
@@ -157,6 +157,7 @@ monster or object detection found semi-dead vault guard at <0,0> while
        monsters on level; likewise object detection and guard's minvent
 squadprob[] in mkroom.c was defined with 5 elements but initialized only 4
        resulting in giant ants sometimes
+allow nurses heal attack when wielding a non-weapon/weaptool
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index cbec561e791ee2f8365122741203d200a63b48a0..770b8d48c0745f232f8f9f145c96a128953ce4a1 100644 (file)
@@ -1508,7 +1508,9 @@ register struct attack *mattk;
             hitmsg(mtmp, mattk);
             break;
         }
-        if (!uwep && !uarmu && !uarm && !uarmc
+        /* weapon check should match the one in sounds.c for MS_NURSE */
+        if (!(uwep && (uwep->oclass == WEAPON_CLASS || is_weptool(uwep)))
+            && !uarmu && !uarm && !uarmc
             && !uarms && !uarmg && !uarmf && !uarmh) {
             boolean goaway = FALSE;