]> granicus.if.org Git - nethack/commitdiff
fix #H4462 - grammar in corpse eating message
authorPatR <rankin@nethack.org>
Thu, 4 Aug 2016 00:59:10 +0000 (17:59 -0700)
committerPatR <rankin@nethack.org>
Thu, 4 Aug 2016 00:59:10 +0000 (17:59 -0700)
"The the Wizard of Yendor corpse tastes terrible."

"The" was supplied when formatting the sentence, "the" when formatting
the corpse object.  Same applied to several other monsters, those
flagged as unique and without personal name (Oracle, Cyclops, others).

This also changes the corpse eating message to not always specify the
taste as "terrible" when the eater is omnivorous.

It also makes corpses (and tins) of unique monsters be wishable in
wizard mode.  I had killed the Wizard at least half a dozen times
without a corpse being left, so used wishing instead.  Later retries
did finally leave one--lack of corpse turned out to just be by chance.

doc/fixes36.1
src/eat.c
src/objnam.c

index c4198661af591e792cfdd652cec6acc860eaddfd..ee67cc3715f0569916a351344ce4e825365df742 100644 (file)
@@ -323,6 +323,9 @@ clarify that shape-shifted vampires revert to vampire form when petrified or
        digested; when back in 'V' form, they're vulnerable to such damage
 when poly'd into an engulfer which does digestion damage, a kill resulting in
        a level gain gave "welcome to level N+1" before "you digest <victim>"
+any corpse eaten by omnivorous hero always tasted "terrible"
+eating the corpse of a unique non-named monster (Wizard of Yendor, Oracle,
+       Chromatic Dragon, others) gave "The the <monster corpse> tastes ..."
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index 52e29def5e1cb7e604d81951e217e0029add4907..ff5390496ce9ebe712fda514c15e9994dd03b919 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 eat.c   $NHDT-Date: 1467028559 2016/06/27 11:55:59 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.171 $ */
+/* NetHack 3.6 eat.c   $NHDT-Date: 1470272344 2016/08/04 00:59:04 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.172 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1662,22 +1662,33 @@ struct obj *otmp;
     } else if (mnum == PM_FLOATING_EYE && u.umonnum == PM_RAVEN) {
         You("peck the eyeball with delight.");
     } else {
-        /* [is this right?  omnivores end up always disliking the taste] */
-        boolean yummy = vegan(&mons[mnum])
-                           ? (!carnivorous(youmonst.data)
-                              && herbivorous(youmonst.data))
-                           : (carnivorous(youmonst.data)
-                              && !herbivorous(youmonst.data));
-
+        /* yummy is always False for omnivores, palatable always True */
+        boolean yummy = (vegan(&mons[mnum])
+                            ? (!carnivorous(youmonst.data)
+                               && herbivorous(youmonst.data))
+                            : (carnivorous(youmonst.data)
+                               && !herbivorous(youmonst.data))),
+                palatable = (vegetarian(&mons[mnum])
+                                ? herbivorous(youmonst.data)
+                                : carnivorous(youmonst.data));
+        const char *pmxnam = food_xname(otmp, FALSE);
+
+        if (!strncmpi(pmxnam, "the ", 4))
+            pmxnam += 4;
         pline("%s%s %s!",
               type_is_pname(&mons[mnum])
-                 ? "" : the_unique_pm(&mons[mnum]) ? "The " : "This ",
-              food_xname(otmp, FALSE),
+                  ? "" : the_unique_pm(&mons[mnum]) ? "The " : "This ",
+              pmxnam,
+                  /* tiger reference is to TV ads for "Frosted Flakes",
+                     breakfast cereal targeted at kids by "Tony the tiger" */
               Hallucination
                   ? (yummy ? ((u.umonnum == PM_TIGER) ? "is gr-r-reat"
                                                       : "is gnarly")
-                           : "is grody")
-                  : (yummy ? "is delicious" : "tastes terrible"));
+                           : palatable ? "is copacetic"
+                                       : "is grody")
+                  : (yummy ? "tastes delicious"
+                           : palatable ? "tastes okay"
+                                       : "tastes terrible"));
     }
 
     return retcode;
index 24e444056a2d0107bf19485ad024a859ffd97fda..90f36a67f9d3d2d8d076e0e648116f43d32ea687 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 objnam.c        $NHDT-Date: 1462067746 2016/05/01 01:55:46 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.169 $ */
+/* NetHack 3.6 objnam.c        $NHDT-Date: 1470272345 2016/08/04 00:59:05 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.177 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -3448,14 +3448,14 @@ typfnd:
             otmp->spe = 0; /* No spinach */
             if (dead_species(mntmp, FALSE)) {
                 otmp->corpsenm = NON_PM; /* it's empty */
-            } else if (!(mons[mntmp].geno & G_UNIQ)
+            } else if ((!(mons[mntmp].geno & G_UNIQ) || wizard)
                        && !(mvitals[mntmp].mvflags & G_NOCORPSE)
                        && mons[mntmp].cnutrit != 0) {
                 otmp->corpsenm = mntmp;
             }
             break;
         case CORPSE:
-            if (!(mons[mntmp].geno & G_UNIQ)
+            if ((!(mons[mntmp].geno & G_UNIQ) || wizard)
                 && !(mvitals[mntmp].mvflags & G_NOCORPSE)) {
                 if (mons[mntmp].msound == MS_GUARDIAN)
                     mntmp = genus(mntmp, 1);