]> granicus.if.org Git - nethack/commitdiff
Vampire in a genocided shape
authorPasi Kallinen <paxed@alt.org>
Tue, 21 Dec 2021 09:18:45 +0000 (11:18 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 21 Dec 2021 09:18:48 +0000 (11:18 +0200)
When you genocided a monster a vampire was shapeshifted into,
the vampire might've stayed in the genocided form.
Always revert back to vampire form if we tried to pick a genocided form.

src/mon.c

index 5088005ed112ba0b976dac1756d7a78e15462f8a..bee0e004092a361b2d32b66ef312da40a71d4f09 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -3964,6 +3964,10 @@ pickvampshape(struct monst* mon)
         mndx = (!rn2(4) && !uppercase_only) ? PM_FOG_CLOUD : PM_VAMPIRE_BAT;
         break;
     }
+
+    if (g.mvitals[mndx].mvflags & G_GENOD)
+        return mon->cham;
+
     return mndx;
 }