]> granicus.if.org Git - nethack/commitdiff
drowning monster's [lack of] corpse
authorPatR <rankin@nethack.org>
Tue, 27 Jul 2021 19:18:55 +0000 (12:18 -0700)
committerPatR <rankin@nethack.org>
Tue, 27 Jul 2021 19:18:55 +0000 (12:18 -0700)
From the newsgroup 6.5 years ago,
| Subject: Re: Reviving drowned pets impossible
if you displaced your pet into water and it drowned, it would never
leave a corpse.  That seems to be moot these days because a pet or
peaceful monster which would drown will refuse to swap places, but
change corpse handling anyway.

doc/fixes37.0
src/mon.c

index ed31e23d2c514326c5eb59b4ff5a4ac5055bd271..ffabdd7caf52895fd9a493736221ffebd9df8785 100644 (file)
@@ -1,4 +1,4 @@
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.596 $ $NHDT-Date: 1626390626 2021/07/15 23:10:26 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.608 $ $NHDT-Date: 1627413528 2021/07/27 19:18:48 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -573,6 +573,8 @@ for "a" vs "an", add ukulele and uke as exceptions for "an u<anything>"
 add new extended command #retravel
 remove special doinv key, functionality was equal to BIND=0:inventory
 some monsters should not have been scared of bugle playing
+monsters that drowned would never leave a corpse (holdover from decades ago
+       when it wasn't possible to recover anything from a water location)
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 0b5d3da9117b4d01a2f7e0ee6e1bc56594c84449..1bebe1f53de3b969b6017cfa9e7d3f2b62352416 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1,4 +1,4 @@
-/* NetHack 3.7 mon.c   $NHDT-Date: 1620923921 2021/05/13 16:38:41 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.375 $ */
+/* NetHack 3.7 mon.c   $NHDT-Date: 1627413528 2021/07/27 19:18:48 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.382 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Derek S. Ray, 2015. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -732,7 +732,7 @@ minliquid_core(struct monst* mtmp)
         if (mtmp->mhpmax > dam)
             mtmp->mhpmax -= dam;
         if (DEADMONSTER(mtmp)) {
-            mondead(mtmp);
+            mondied(mtmp);
             if (DEADMONSTER(mtmp))
                 return 1;
         }
@@ -768,7 +768,7 @@ minliquid_core(struct monst* mtmp)
                    case is not expected to happen (and we haven't made a
                    player-against-monster variation of the message above) */
                 if (g.context.mon_moving)
-                    mondead(mtmp);
+                    mondead(mtmp); /* no corpse */
                 else
                     xkilled(mtmp, XKILL_NOMSG);
             } else {
@@ -776,7 +776,7 @@ minliquid_core(struct monst* mtmp)
                 if (DEADMONSTER(mtmp)) {
                     if (cansee(mtmp->mx, mtmp->my))
                         pline("%s surrenders to the fire.", Monnam(mtmp));
-                    mondead(mtmp);
+                    mondead(mtmp); /* no corpse */
                 } else if (cansee(mtmp->mx, mtmp->my))
                     pline("%s burns slightly.", Monnam(mtmp));
             }
@@ -815,7 +815,7 @@ minliquid_core(struct monst* mtmp)
                       Monnam(mtmp), hliquid("water"));
             }
             if (g.context.mon_moving)
-                mondead(mtmp);
+                mondied(mtmp); /* ok to leave corpse despite water */
             else
                 xkilled(mtmp, XKILL_NOMSG);
             if (!DEADMONSTER(mtmp)) {