]> granicus.if.org Git - nethack/commitdiff
corpse eating feedback
authorPatR <rankin@nethack.org>
Sun, 9 May 2021 08:13:32 +0000 (01:13 -0700)
committerPatR <rankin@nethack.org>
Sun, 9 May 2021 08:13:32 +0000 (01:13 -0700)
Avoid the message combination
|You have a very bad case of stomach acid.
|This acid blob corpse tastes okay.

doc/fixes37.0
src/eat.c

index 6ccdc257118e7aaca9ef960e8deac4c381640018..399048dc9b084d85d37e052aa17af07dfd9fbdd5 100644 (file)
@@ -1,4 +1,4 @@
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.528 $ $NHDT-Date: 1620522110 2021/05/09 01:01:50 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.529 $ $NHDT-Date: 1620548001 2021/05/09 08:13:21 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -508,6 +508,9 @@ if PREFIXES_IN_USE was defined (and VAR_PLAYGROUND forces it to be) when
        COMPRESS was also defined (external save and bones file compression
        via fork()+exec()), the file name buffer in docompress_file() wasn't
        big enough so could overflow and trigger a crash
+suppress "This <foo> corpse takes {delicious|okay|terrible}" if preceded by
+       "You have a bad case of stomach acid" or "Ecch - that must have been
+       poisonous"
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index fadde1bb8535fa3b0c51cbd342c57ffe849c00b5..573bcd75652aa51e33826885892560b15bb1bce2 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1,4 +1,4 @@
-/* NetHack 3.7 eat.c   $NHDT-Date: 1620348708 2021/05/07 00:51:48 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.242 $ */
+/* NetHack 3.7 eat.c   $NHDT-Date: 1620548002 2021/05/09 08:13:22 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.243 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Robert Patrick Rankin, 2012. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -1604,6 +1604,7 @@ eatcorpse(struct obj *otmp)
     if (mnum != PM_ACID_BLOB && !stoneable && !slimeable && rotted > 5L) {
         boolean cannibal = maybe_cannibal(mnum, FALSE);
 
+        /* tp++; -- early return makes this unnecessary */
         pline("Ulch - that %s was tainted%s!",
               (mons[mnum].mlet == S_FUNGUS) ? "fungoid vegetation"
                   : glob ? "glob"
@@ -1679,6 +1680,8 @@ eatcorpse(struct obj *otmp)
         pline("This tastes just like chicken!");
     } else if (mnum == PM_FLOATING_EYE && u.umonnum == PM_RAVEN) {
         You("peck the eyeball with delight.");
+    } else if (tp) {
+        ; /* we've already delivered a message; don't add "it tastes okay" */
     } else {
         /* yummy is always False for omnivores, palatable always True */
         boolean yummy = (vegan(&mons[mnum])