]> granicus.if.org Git - nethack/commitdiff
vampire shift to fog cloud
authorPatR <rankin@nethack.org>
Wed, 13 Sep 2017 01:26:14 +0000 (18:26 -0700)
committerPatR <rankin@nethack.org>
Wed, 13 Sep 2017 01:26:14 +0000 (18:26 -0700)
If a vampire, possibly in bat form, on the far side of a closed door
shifted shape to fog cloud in order to pass under the door, you were
told about the shape change if you could see it after being placed at
the door's location even if you couldn't see the vampire's pre-move
location.  This is a bug introduced after 3.6.0....

doc/fixes36.1
src/monmove.c

index 76989dbfb1e42b51a6b63b2e86993d16b2c70667..156cc5ef0f3d6ea0d3547cf4caf72dee6c2f462a 100644 (file)
@@ -483,6 +483,8 @@ replace the fix for preventing putting on a helm of opposite alignment from
        causing wielded Excalibur from blasting hero twice
 hero poly'd into vampire could drain monster down to 0 HP without killing it,
        triggering impossible "dmonsfree: 1 removed doesn't match 0 pending"
+"you observe a fog cloud where a vampire/bat was" if an unseen vampire on the
+       far side of a closed door shifted shape to pass under that door
 
 
 Platform- and/or Interface-Specific Fixes
index 0d1241ab42917f58b665647649025510f7a469c9..ab17709f42776a05655804ab16d07b20ef02ca2f 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 monmove.c       $NHDT-Date: 1505180840 2017/09/12 01:47:20 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.92 $ */
+/* NetHack 3.6 monmove.c       $NHDT-Date: 1505265968 2017/09/13 01:26:08 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.93 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -752,6 +752,7 @@ register int after;
     boolean uses_items = 0, setlikes = 0;
     boolean avoid = FALSE;
     boolean better_with_displacing = FALSE;
+    boolean sawmon = canspotmon(mtmp); /* before it moved */
     struct permonst *ptr;
     struct monst *mtoo;
     schar mmoved = 0; /* not strictly nec.: chi >= 0 will do */
@@ -1249,7 +1250,7 @@ postmov:
                     && (amorphous(ptr)
                         || (can_fog(mtmp)
                             && vamp_shift(mtmp, &mons[PM_FOG_CLOUD],
-                                          canspotmon(mtmp))))) {
+                                          sawmon)))) {
                     /* update cached value for vamp_shift() case */
                     ptr = mtmp->data;
                     if (flags.verbose && canseemon(mtmp))