fix #H5547 - named vampire shapeshifting message
Report was about "Pet vampire" but the relevant aspect was that the vampire had been assigned a name, not that it was tame: You observe a Hilda where a Hilda was. Investigating this has uncovered two other bugs, one potentially serious. m_monnam() overrides hallucination but seems to be getting used to some situations where hallucination should be honored (several instances). Dynamically constructed format strings are including monster or object names in the format (rather than the usual use as arguments), so player assigned names containing percent signs could cause havoc (a few instances). This fixes some of the former and one of the latter, but doesn't deal with various other cases revealed by grep.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 decl.h $NHDT-Date: 1432512782 2015/05/25 00:13:02 $ $NHDT-Branch: master $:$NHDT-Revision: 1.76 $ */
|
||||
/* NetHack 3.6 decl.h $NHDT-Date: 1496531104 2017/06/03 23:05:04 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.82 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -317,6 +317,7 @@ E const char *materialnm[];
|
||||
#define SUPPRESS_HALLUCINATION 0x04
|
||||
#define SUPPRESS_SADDLE 0x08
|
||||
#define EXACT_NAME 0x0F
|
||||
#define SUPPRESS_NAME 0x10
|
||||
|
||||
/* Vision */
|
||||
E NEARDATA boolean vision_full_recalc; /* TRUE if need vision recalc */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1495346095 2017/05/21 05:54:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.588 $ */
|
||||
/* NetHack 3.6 extern.h $NHDT-Date: 1496531111 2017/06/03 23:05:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.589 $ */
|
||||
/* Copyright (c) Steve Creps, 1988. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -404,6 +404,7 @@ E char *FDECL(mon_nam, (struct monst *));
|
||||
E char *FDECL(noit_mon_nam, (struct monst *));
|
||||
E char *FDECL(Monnam, (struct monst *));
|
||||
E char *FDECL(noit_Monnam, (struct monst *));
|
||||
E char *FDECL(noname_monnam, (struct monst *, int));
|
||||
E char *FDECL(m_monnam, (struct monst *));
|
||||
E char *FDECL(y_monnam, (struct monst *));
|
||||
E char *FDECL(Adjmonnam, (struct monst *, const char *));
|
||||
|
||||
Reference in New Issue
Block a user