]> granicus.if.org Git - nethack/commitdiff
rotten wraith corpse
authorcohrs <cohrs>
Sun, 10 Feb 2002 20:19:24 +0000 (20:19 +0000)
committercohrs <cohrs>
Sun, 10 Feb 2002 20:19:24 +0000 (20:19 +0000)
sidestep the rotten partly eaten wraith corpse impossible() message by
causing rotten wraith corpses to immediately rot away completely

src/eat.c

index 471016fc85476fff94a232c3d4775f71893282d3..c964bfbaed92c927baab5c415543e8da8b1e7f89 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1244,8 +1244,17 @@ eatcorpse(otmp)          /* called when a corpse is selected as food */
                otmp->orotten = TRUE;
                (void)touchfood(otmp);
                retcode = 1;
-           } else
-               consume_oeaten(otmp, 2);        /* oeaten >>= 2 */
+           }
+
+           if (!mons[otmp->corpsenm].cnutrit) {
+               /* no nutrution: rots away, no message if you passed out */
+               if (!retcode) pline_The("corpse rots away completely.");
+               if (carried(otmp)) useup(otmp);
+               else useupf(otmp, 1L);
+               retcode = 2;
+           }
+                   
+           if (!retcode) consume_oeaten(otmp, 2);      /* oeaten >>= 2 */
        } else {
            pline("%s%s %s!",
                  !uniq ? "This " : !type_is_pname(&mons[mnum]) ? "The " : "",