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.
This commit is contained in:
Pasi Kallinen
2023-09-03 18:22:11 +03:00
parent 67513c96bb
commit 50084750c4
2 changed files with 4 additions and 3 deletions

View File

@@ -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))) {