]> granicus.if.org Git - nethack/commitdiff
fix #H8619 - hallucination vs vampire transform
authorPatR <rankin@nethack.org>
Wed, 24 Apr 2019 21:02:09 +0000 (14:02 -0700)
committerPatR <rankin@nethack.org>
Wed, 24 Apr 2019 21:02:09 +0000 (14:02 -0700)
|The seemingly dead vampire bat rises as a vampire.
was overriding hallucination when describing both old and new forms.
In 3.6.0 it only overrode the dying shape (explicitly so, presumeably
because the feature was brand new) and honored hallucination for the
revived shape.  The 3.6.1 fix to prevent non-hallucinating:  'The
seemingly dead Foo rises as Foo.' for a named vampire unintentionally
overrode hallucination for the revived shape.

Change it to honor hallucination for both before and after monsters
|The seemingly dead grid bug rises as a microscopic space fleet.

doc/fixes36.2
src/mon.c

index 88a9c2a687c17ccc81f51b149f4740f9f59875ab..b06d0da42263d89380875876f13f8eea7c0b8d56 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.307 $ $NHDT-Date: 1555801218 2019/04/20 23:00:18 $
+$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.308 $ $NHDT-Date: 1556139724 2019/04/24 21:02:04 $
 
 This fixes36.2 file is here to capture information about updates in the 3.6.x
 lineage following the release of 3.6.1 in April 2018. Please note, however,
@@ -416,6 +416,8 @@ a quantum mechanic hit that teleported the target could also kill it at the
        fatal unless the teleport is negated by cancellation (magic or armor)
 if a mimic concealed itself as a corpse, it could pick a monster type which
        never leaves a corpse
+message given when shape-shifted vampire cheats death by reverting to its
+       original form ignored hallucination when describing old and new forms
 
 
 Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
index 7dc5f7c483f685e558bf966218bb99c8d7fd5a40..2882a226c006e742acb7b1fec39864e93b90acb2 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 mon.c   $NHDT-Date: 1555552629 2019/04/18 01:57:09 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.282 $ */
+/* NetHack 3.6 mon.c   $NHDT-Date: 1556139724 2019/04/24 21:02:04 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.284 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Derek S. Ray, 2015. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1935,9 +1935,7 @@ register struct monst *mtmp;
             Sprintf(buf, "%s suddenly %s and rises as %%s!",
                     x_monnam(mtmp, ARTICLE_THE,
                              spec_mon ? (char *) 0 : "seemingly dead",
-                             SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION
-                                 | SUPPRESS_INVISIBLE | SUPPRESS_IT,
-                             FALSE),
+                             (SUPPRESS_INVISIBLE | SUPPRESS_IT), FALSE),
                     spec_death ? "reconstitutes" : "transforms");
             mtmp->mcanmove = 1;
             mtmp->mfrozen = 0;
@@ -1965,13 +1963,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" */
-                if (!type_is_pname(mtmp->data))
-                    whom = an(whom);
-                pline(upstart(buf), whom);
+                /* 3.6.0 used a_monnam(mtmp); that was weird if mtmp was
+                   named: "Dracula suddenly transforms and rises as Dracula";
+                   3.6.1 used mtmp->data->mname; that ignored hallucination */
+                pline(upstart(buf),
+                      x_monnam(mtmp, ARTICLE_A, (char *) 0,
+                               (SUPPRESS_NAME | SUPPRESS_IT
+                                | SUPPRESS_INVISIBLE), FALSE));
                 vamp_rise_msg = TRUE;
             }
             newsym(x, y);