]> granicus.if.org Git - nethack/commitdiff
Count all poly'ing tins as potential sliming cures
authorMichael Meyer <me@entrez.cc>
Fri, 20 Aug 2021 23:20:00 +0000 (19:20 -0400)
committerPatR <rankin@nethack.org>
Sun, 29 Aug 2021 22:36:35 +0000 (15:36 -0700)
Popeye, used to check whether eating a particular tin is a potential
lifesaving action, considered tins of chameleon meat a cure for sliming
(since you can polymorph into a fiery monster), but didn't credit the
same possible curative power to other tins which can polymorph the hero.

Use the polyfodder macro (used elsewhere to check whether eating
something will polymorph a monster/pet) to determine whether a tin will
polymorph the hero.

src/eat.c

index 2bb8be744f9e992bf6a82d7a6b5672dcfb6eb5d6..6ec3014b01b733426104bfa98289fc15c855794b 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -3546,7 +3546,7 @@ Popeye(int threat)
                           && (mndx == PM_LIZARD || acidic(&mons[mndx])));
     /* polymorph into a fiery monster */
     case SLIMED:
-        return (boolean) (mndx == PM_CHAMELEON);
+        return (boolean) polyfodder(otin);
     /* no tins can cure these (yet?) */
     case SICK:
     case VOMITING: