]> granicus.if.org Git - nethack/commitdiff
fix part of #H9397 - hallucinatory mon names
authorPatR <rankin@nethack.org>
Fri, 22 Nov 2019 01:43:55 +0000 (17:43 -0800)
committerPatR <rankin@nethack.org>
Fri, 22 Nov 2019 01:43:55 +0000 (17:43 -0800)
Fix the issue where a hallucinatory monster name which begins with
a slash is having that stripped off as if it was a gendor and/or
personal-name flag.

The main issue was pronouns ignoring hallucination and this doesn't
attempt to address that.

Also, add new hallucinatory name "leathery-winged avian" which has
been lurking for a while.

dat/bogusmon.txt
doc/fixes36.3
src/do_name.c

index 8f88d3f609acd783943c38f96fe91ec41e420ed3..a4ac2389df35b94a62d9be891dc51c749f68f8fc 100644 (file)
@@ -1,4 +1,4 @@
-# NetHack 3.6  bogusmon.txt       $NHDT-Date: 1524689579 2018/04/25 20:52:59 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.7 $
+# NetHack 3.6  bogusmon.txt       $NHDT-Date: 1574387024 2019/11/22 01:43:44 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.8 $
 # Copyright (c) 2016 by Pasi Kallinen
 # NetHack may be freely redistributed.  See license for details.
 #
@@ -189,6 +189,9 @@ Dalek
 microscopic space fleet
 Ravenous Bugblatter Beast of Traal
 
+# The Tough Guide to Fantasyland
+leathery-winged avian
+
 # TMNT
 teenage mutant ninja turtle
 
index 07a97fe563a6dc141be1592e005c079aef919ab0..4f7ec8ea6e8477047fe6b829af862b8f2ac85e90 100644 (file)
@@ -1,4 +1,4 @@
-$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.184 $ $NHDT-Date: 1574107001 2019/11/18 19:56:41 $
+$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.187 $ $NHDT-Date: 1574387029 2019/11/22 01:43:49 $
 
 This fixes36.3 file is here to capture information about updates in the 3.6.x
 lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -291,6 +291,7 @@ Fixes post-beta1
 fix several tribute typos
 pluralization correction for unlikely epoch and loch
 ensure that --showpaths displays the personal configuration file last
+don't strip leading slash from hallucinatory monster name "/b/tard"
 unix: Fix double DLB definition in linux hints file
 windows: fix --showpaths output for the data file which relies on being
        constructed programmatically to incorporate the version suffix
index c8965a706e35e08b42f1da7c35e91d00186b975c..354850a815be95dd956c3d36def9b113562ffae5 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 do_name.c       $NHDT-Date: 1573940540 2019/11/16 21:42:20 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.150 $ */
+/* NetHack 3.6 do_name.c       $NHDT-Date: 1574387027 2019/11/22 01:43:47 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.151 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Pasi Kallinen, 2018. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1738,8 +1738,8 @@ boolean called;
         Strcat(buf, "saddled ");
     has_adjectives = (buf[0] != '\0');
 
-    /* Put the actual monster name or type into the buffer now */
-    /* Be sure to remember whether the buffer starts with a name */
+    /* Put the actual monster name or type into the buffer now.
+       Remember whether the buffer starts with a personal name. */
     if (do_hallu) {
         char rnamecode;
         char *rname = rndmonnam(&rnamecode);
@@ -2019,11 +2019,12 @@ STATIC_OVL char *
 bogusmon(buf, code)
 char *buf, *code;
 {
+    static const char bogon_codes[] = "-_+|="; /* see dat/bonusmon.txt */
     char *mname = buf;
 
     get_rnd_text(BOGUSMONFILE, buf, rn2_on_display_rng);
     /* strip prefix if present */
-    if (!letter(*mname)) {
+    if (index(bogon_codes, *mname)) {
         if (code)
             *code = *mname;
         ++mname;