]> granicus.if.org Git - nethack/commitdiff
B14006 - monsters and lava
authorcohrs <cohrs>
Thu, 12 Dec 2002 04:28:28 +0000 (04:28 +0000)
committercohrs <cohrs>
Thu, 12 Dec 2002 04:28:28 +0000 (04:28 +0000)
- water elementals now get a special message when they land in lava
- rather than track down all places where non-moving monsters can end up in
lava (or water, not that it currently matters), add a check to mcalcdistress
to catch all such cases, once per turn.

doc/fixes34.1
src/mon.c

index 4fa5c743d2ae179c3eaa5613bf4abaa811c237c3..69d39ee535f5a5882d665a1d129b45138b02c3ce 100644 (file)
@@ -325,6 +325,7 @@ mimics that are detected but not seen should not display as their mimiced
 not all cavemen are human, so avoid using human in quest messages
 tengu is singular and plural, some rumors were incorrect
 don't let leader or nemesis be renamed
+non-moving monster are not affected by liquid
 
 
 Platform- and/or Interface-Specific Fixes
index b2b858be892d2e11d626acb6e7c663235691cfec..5658345cb114410dbcd6a04f330addb5843e48bb 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -380,7 +380,9 @@ register struct monst *mtmp;
        if (!is_clinger(mtmp->data) && !likes_lava(mtmp->data)) {
            if (!resists_fire(mtmp)) {
                if (cansee(mtmp->mx,mtmp->my))
-                   pline("%s burns to a crisp.", Monnam(mtmp));
+                   pline("%s %s.", Monnam(mtmp),
+                         mtmp->data == &mons[PM_WATER_ELEMENTAL] ?
+                         "boils aways" : "burns to a crisp");
                mondead(mtmp);
            }
            else {
@@ -473,6 +475,13 @@ mcalcdistress()
     for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
        if (DEADMONSTER(mtmp)) continue;
 
+       /* must check non-moving monsters once/turn in case
+        * they managed to end up in liquid */
+       if (mtmp->data->mmove == 0) {
+           if (vision_full_recalc) vision_recalc(0);
+           if (minliquid(mtmp)) continue;
+       }
+
        /* regenerate hit points */
        mon_regen(mtmp, FALSE);