]> granicus.if.org Git - nethack/commitdiff
Poly into fire elemental, eat flammable items
authorPasi Kallinen <paxed@alt.org>
Fri, 20 Jan 2023 16:56:01 +0000 (18:56 +0200)
committerPasi Kallinen <paxed@alt.org>
Fri, 20 Jan 2023 16:56:01 +0000 (18:56 +0200)
doc/fixes3-7-0.txt
src/eat.c

index 7ffcd69f66f4724cc4291fbf2575b704027a9e61..6e8864a0fa9a1cada7cd53e7ee87130f763dc763 100644 (file)
@@ -1088,6 +1088,7 @@ fix freeing a worn object when forced to drop it by falling down stairs
 allow setting per-level "temperature": hot, cold, or temperate, currently
        only affects some messages
 digging is noisy
+polymorphing into fire elemental allows you eat flammable items
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index d1343404e856787dd2a328afa7a28776e85e1519..68bd9f499903a966eb369b0c712da85eec353922 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -96,6 +96,10 @@ is_edible(register struct obj *obj)
     /* above also prevents the Amulet from being eaten, so we must never
        allow fake amulets to be eaten either [which is already the case] */
 
+    if (gy.youmonst.data == &mons[PM_FIRE_ELEMENTAL]
+        && is_flammable(obj))
+        return TRUE;
+
     if (metallivorous(gy.youmonst.data) && is_metallic(obj)
         && (gy.youmonst.data != &mons[PM_RUST_MONSTER] || is_rustprone(obj)))
         return TRUE;
@@ -520,7 +524,10 @@ done_eating(boolean message)
             pline1(gn.nomovemsg);
         gn.nomovemsg = 0;
     } else if (message)
-        You("finish eating %s.", food_xname(piece, TRUE));
+        You("finish %s %s.",
+            (gy.youmonst.data == &mons[PM_FIRE_ELEMENTAL])
+            ? "consuming" : "eating",
+            food_xname(piece, TRUE));
 
     if (piece->otyp == CORPSE || piece->globby)
         cpostfx(piece->corpsenm);