From b1fd7344e37f46bddd38eddba03b9df532767c40 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Fri, 20 Jan 2023 18:56:01 +0200 Subject: [PATCH] Poly into fire elemental, eat flammable items --- doc/fixes3-7-0.txt | 1 + src/eat.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 7ffcd69f6..6e8864a0f 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/eat.c b/src/eat.c index d1343404e..68bd9f499 100644 --- 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);