From bda97fb3fa1d74c058ed3e7fb4a0290df775cb9f Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Fri, 2 Jul 2010 01:49:51 +0000 Subject: [PATCH] eating corpses while hallucinating (trunk only) Contributed by , give an alternate message when eating a corpse while hallucinating, including one that gives homage to Tony the Tiger from old Frosted Flakes commercials if you happen to be polymorphed into a tiger. Even players who try to keep their characters hallucinating all the time are unlikely to ever run into "tastes gr-r-reat!". I rewrote the conditional expression to only test Hallucination once. And I added the comment about omnivores, who'll never get "is delicious" result with the current carnivore vs herbivore logic. (That behavior has been around for quite a while, but seems somewhat suspect.) --- src/eat.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/eat.c b/src/eat.c index 3b07630f8..2e2b90cd6 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,5 +1,4 @@ /* NetHack 3.5 eat.c $Date$ $Revision$ */ -/* SCCS Id: @(#)eat.c 3.5 2008/07/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1640,14 +1639,21 @@ eatcorpse(otmp) /* called when a corpse is selected as food */ (Stone_resistance || Hallucination)) { pline("This tastes just like chicken!"); } 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))); + pline("%s%s %s!", type_is_pname(&mons[mnum]) ? "" : the_unique_pm(&mons[mnum]) ? "The " : "This ", food_xname(otmp, FALSE), - (vegan(&mons[mnum]) ? - (!carnivorous(youmonst.data) && herbivorous(youmonst.data)) : - (carnivorous(youmonst.data) && !herbivorous(youmonst.data))) - ? "is delicious" : "tastes terrible"); + Hallucination ? + (yummy ? ((u.umonnum == PM_TIGER) ? "is gr-r-reat" : + "is gnarly") : "is grody") : + (yummy ? "is delicious" : "tastes terrible")); } return(retcode);