From: Michael Meyer Date: Fri, 17 Jun 2022 14:42:14 +0000 (-0400) Subject: Don't prompt to continue eating with one bite left X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee002ee91e390ece24d885642d9069a303357974;p=nethack Don't prompt to continue eating with one bite left There was already handling in place to prevent showing the "continue eating?" prompt for one-gulp food (like a wraith corpse), since the hero would finish eating the food on that turn regardless of what the player answered to the prompt. Resuming an interrupted multi-bite meal with only a single bite remaining had the same problem, but wasn't accounted for in the special "one gulp" handling. Modify the condition so it checks for the number of bites remaining in the food, not the number of bites total, and show the prompt only when there's more than one bite left. --- diff --git a/src/eat.c b/src/eat.c index 60e3d11db..b454874bd 100644 --- a/src/eat.c +++ b/src/eat.c @@ -3140,8 +3140,9 @@ lesshungry(int num) } else { g.context.victual.fullwarn = TRUE; if (g.context.victual.canchoke - && g.context.victual.reqtime > 1) { - /* a one-gulp food will not survive a stop */ + && (g.context.victual.reqtime + - g.context.victual.usedtime) > 1) { + /* food with one bite left will not survive a stop */ if (!paranoid_query(ParanoidEating, "Continue eating?")) { reset_eat(); g.nomovemsg = (char *) 0;