]> granicus.if.org Git - nethack/commitdiff
Make older corpses not taste okay
authorPasi Kallinen <paxed@alt.org>
Thu, 27 Oct 2016 18:44:38 +0000 (21:44 +0300)
committerPasi Kallinen <paxed@alt.org>
Thu, 27 Oct 2016 18:44:44 +0000 (21:44 +0300)
Post-3.6.0 change made practically all corpses taste okay.
Change it so there's always a 10% chance for the corpse
to taste terrible, and increase the chance if the corpse
is slightly old.

src/eat.c

index 34277af039c2aae23430730281c0aa5ab0e5fd82..2c748ef066c522898b0c184fe93c09da48adceed 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1674,9 +1674,11 @@ struct obj *otmp;
                                && herbivorous(youmonst.data))
                             : (carnivorous(youmonst.data)
                                && !herbivorous(youmonst.data))),
-                palatable = (vegetarian(&mons[mnum])
-                                ? herbivorous(youmonst.data)
-                                : carnivorous(youmonst.data));
+            palatable = ((vegetarian(&mons[mnum])
+                          ? herbivorous(youmonst.data)
+                          : carnivorous(youmonst.data))
+                         && rn2(10)
+                         && ((rotted < 1) ? TRUE : !rn2(rotted+1)));
         const char *pmxnam = food_xname(otmp, FALSE);
 
         if (!strncmpi(pmxnam, "the ", 4))