]> granicus.if.org Git - nethack/commitdiff
\#wizkill while engulfed
authorPatR <rankin@nethack.org>
Fri, 10 Jun 2022 22:19:01 +0000 (15:19 -0700)
committerPatR <rankin@nethack.org>
Fri, 10 Jun 2022 22:19:01 +0000 (15:19 -0700)
Targetting any of the eight surrounding spots while swallowed will
kill the engulfer.  Picking a spot farther away reports "no monster
there" even if there does happen to be one at the chosen spot.

src/cmd.c

index 8d8173af3792111570180070bf1a2b113ed3f91b..a5451249fd7a031458c3682d4ae874f8718c1453 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1,4 +1,4 @@
-/* NetHack 3.7 cmd.c   $NHDT-Date: 1652861829 2022/05/18 08:17:09 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.565 $ */
+/* NetHack 3.7 cmd.c   $NHDT-Date: 1654899519 2022/06/10 22:18:39 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.571 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2013. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1199,6 +1199,8 @@ wiz_kill(void)
                 }
                 break;
             }
+        } else if (u.uswallow) {
+            mtmp = next2u(cc.x, cc.y) ? u.ustuck : 0;
         } else {
             mtmp = m_at(cc.x, cc.y);
         }