]> granicus.if.org Git - nethack/commitdiff
vortexes and unsolid monsters need not avoid webs
authorDavid Cohrs <davecohrs@gmail.com>
Wed, 3 Feb 2016 19:50:03 +0000 (11:50 -0800)
committerDavid Cohrs <davecohrs@gmail.com>
Wed, 3 Feb 2016 19:50:03 +0000 (11:50 -0800)
Based on a bug report from beta testers in 2010. mintrap()
already had partial checks for this (now fire vortex also burns
a web, as per suggestion in the bug report) but mfndpos()
lacked checks so mintrap() code was almost never exercised.

doc/fixes36.1
src/mon.c
src/trap.c

index b2995c6eb2c6e97d97a735d5aa3a6ae11ec9f217..8c6866cb20e7794948f9efd06d3e3c17b4047c98 100644 (file)
@@ -148,6 +148,7 @@ stolen_value, used when breaking shop items from outside the shop among other
        times, could describe the shopkeeper as "it" when not seen
 when two or more shopkeepers were visible at once, 'p' command could be used
        to probe map for locations of other shopkeepers and arbitrary monsters
+vortexes and other unsolid monsters need not avoid webs
 
 
 Platform- and/or Interface-Specific Fixes
index 2dce54e1b573c3696eaa47d369fdcc3012f87d3f..c97963abe9bd03242fcbab854fc4497d1f198e7b 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 mon.c   $NHDT-Date: 1453371163 2016/01/21 10:12:43 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.208 $ */
+/* NetHack 3.6 mon.c   $NHDT-Date: 1454528962 2016/02/03 19:49:22 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.210 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1368,7 +1368,8 @@ nexttry: /* eels prefer the water, but if there is no water nearby,
                         && (ttmp->ttyp != FIRE_TRAP || !resists_fire(mon))
                         && (ttmp->ttyp != SQKY_BOARD || !is_flyer(mdat))
                         && (ttmp->ttyp != WEB
-                            || (!amorphous(mdat) && !webmaker(mdat)))
+                            || (!amorphous(mdat) && !webmaker(mdat)
+                                && !is_whirly(mdat) && !unsolid(mdat)))
                         && (ttmp->ttyp != ANTI_MAGIC || !resists_magm(mon))) {
                         if (!(flag & ALLOW_TRAPS)) {
                             if (mon->mtrapseen & (1L << (ttmp->ttyp - 1)))
index 83164b2d50ccc6b901c194d7b595412a74ff5f73..716962de1d48d25547e258128dddef2f46cfe353 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 trap.c  $NHDT-Date: 1452919834 2016/01/16 04:50:34 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.259 $ */
+/* NetHack 3.6 trap.c  $NHDT-Date: 1454528963 2016/02/03 19:49:23 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.261 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -2412,10 +2412,12 @@ register struct monst *mtmp;
                 break;
             if (amorphous(mptr) || is_whirly(mptr) || unsolid(mptr)) {
                 if (acidic(mptr) || mptr == &mons[PM_GELATINOUS_CUBE]
-                    || mptr == &mons[PM_FIRE_ELEMENTAL]) {
+                    || mptr == &mons[PM_FIRE_ELEMENTAL]
+                    || mptr == &mons[PM_FIRE_VORTEX]) {
                     if (in_sight)
                         pline("%s %s %s spider web!", Monnam(mtmp),
-                              (mptr == &mons[PM_FIRE_ELEMENTAL])
+                              (mptr == &mons[PM_FIRE_ELEMENTAL]
+                               || mptr == &mons[PM_FIRE_VORTEX])
                                   ? "burns"
                                   : "dissolves",
                               a_your[trap->madeby_u]);