]> granicus.if.org Git - nethack/commitdiff
fix "a Vlad the Impaler"
authorPatR <rankin@nethack.org>
Sat, 12 May 2018 13:41:57 +0000 (06:41 -0700)
committerPatR <rankin@nethack.org>
Sun, 13 May 2018 01:47:34 +0000 (18:47 -0700)
Killing Vlad while he was in bat/fog cloud/wolf form gave poorly
worded feedback when he reverted to vampire form.

src/mon.c

index b088460ec8c54efcc5480fc90c3431d2330943ac..2ccb585cb54f90e44b8f0555414d218baa7fb4a2 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 mon.c   $NHDT-Date: 1522540516 2018/03/31 23:55:16 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.250 $ */
+/* NetHack 3.6 mon.c   $NHDT-Date: 1526132509 2018/05/12 13:41:49 $  $NHDT-Branch: master $:$NHDT-Revision: 1.252 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Derek S. Ray, 2015. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1876,9 +1876,13 @@ register struct monst *mtmp;
             else
                 mtmp->cham = mndx;
             if (canspotmon(mtmp)) {
+                const char *whom = mtmp->data->mname;
+
                 /* was using a_monnam(mtmp) but that's weird if mtmp is named:
                    "Dracula suddenly transforms and rises as Dracula" */
-                pline(upstart(buf), an(mtmp->data->mname));
+                if (!type_is_pname(mtmp->data))
+                    whom = an(whom);
+                pline(upstart(buf), whom);
                 vamp_rise_msg = TRUE;
             }
             newsym(x, y);