]> granicus.if.org Git - nethack/commitdiff
vampire genocide could produce unkillable critter
authorPatR <rankin@nethack.org>
Sat, 12 Dec 2015 08:34:16 +0000 (00:34 -0800)
committerPatR <rankin@nethack.org>
Sat, 12 Dec 2015 08:34:16 +0000 (00:34 -0800)
Vampires who were currently shape-shifted into a fog cloud, bat, or wolf
became an unkillable fog could, bat, or wolf if the player genocided
vampires.  When such a creature was killed, the attempt to transform it
back into a vampire failed, but the monster continued to be resurrected
anyway.

doc/fixes36.1
src/mon.c

index b682a6c2567d25976f814b1f2a52ea2d27a07a17..b5705cff7dfaf0f8b83e7448f77b040ee2aeee30 100644 (file)
@@ -12,7 +12,10 @@ looking at distant objects while wearing the Eyes of the Overworld made their
 message when cursed wand zapped by a monster happens to explode was suppressed
        if hero was deaf, even though that message has no audible component
 support explicit 'symset:default' and 'symset:Default symbols' in options
-Crash during startup if player name set as 'player' in defaults
+crash during startup if player name set as 'player' in defaults
+any existing vampire shape-shifted into critter (fog cloud, bat, wolf) became
+       an unkillable critter if vampires were genocided
+
 
 Platform- and/or Interface-Specific Fixes
 -----------------------------------------
index ade59681062f5f5f0185280be3b22cac66048a33..467ec58b547647881626b8d50fcc3a5f31ccde52 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 mon.c   $NHDT-Date: 1449269918 2015/12/04 22:58:38 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.199 $ */
+/* NetHack 3.6 mon.c   $NHDT-Date: 1449908726 2015/12/12 08:25:26 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.200 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1741,7 +1741,8 @@ register struct monst *mtmp;
         int x = mtmp->mx, y = mtmp->my;
 
         /* this only happens if shapeshifted */
-        if (mndx >= LOW_PM && mndx != monsndx(mtmp->data)) {
+        if (mndx >= LOW_PM && mndx != monsndx(mtmp->data)
+            && !(mvitals[mndx].mvflags & G_GENOD)) {
             char buf[BUFSZ];
             boolean in_door = (amorphous(mtmp->data)
                                && closed_door(mtmp->mx, mtmp->my)),