From 50084750c426c465e976b23c9a7f871a8950fae3 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 3 Sep 2023 18:22:11 +0300 Subject: [PATCH] Ring of hunger prevents choking on food ... but you will not be prompted to stop eating, and you will vomit enough to be hungry afterwards. --- doc/fixes3-7-0.txt | 1 + src/eat.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index ce25693dc..0433bd16d 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1233,6 +1233,7 @@ if Magicbane cancelled a shapeshifter, forcing it to 'unshift', subsequent messages continued to refer to the shifted form a pet that was poison resistant but not stoning resistant would eat Medusa's corpse and be turned to stone +ring of hunger prevents choking on your food Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/src/eat.c b/src/eat.c index 854e3797b..a2a050619 100644 --- a/src/eat.c +++ b/src/eat.c @@ -256,14 +256,14 @@ choke(struct obj *food) exercise(A_CON, FALSE); - if (Breathless || (!Strangled && !rn2(20))) { + if (Breathless || Hunger || (!Strangled && !rn2(20))) { /* choking by eating AoS doesn't involve stuffing yourself */ if (food && food->otyp == AMULET_OF_STRANGULATION) { You("choke, but recover your composure."); return; } You("stuff yourself and then vomit voluminously."); - morehungry(1000); /* you just got *very* sick! */ + morehungry(Hunger ? (u.uhunger - 60) : 1000); /* you just got *very* sick! */ vomit(); } else { gk.killer.format = KILLED_BY_AN; @@ -3167,7 +3167,7 @@ lesshungry(int num) /* Have lesshungry() report when you're nearly full so all eating * warns when you're about to choke. */ - if (u.uhunger >= 1500 + if (u.uhunger >= 1500 && !Hunger && (!gc.context.victual.eating || (gc.context.victual.eating && !gc.context.victual.fullwarn))) {