From 83056d45d78fba85f98f3ecac2804e1660e5feff Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 21 Sep 2017 16:35:56 -0700 Subject: [PATCH] fix #H4919 - vomit message sequencing The countdown for delayed vomiting gave message "you suddenly vomit!" at T-2, allowing you to move some more, then vomit at T-0 with no message, finally at T+2 get "you can move again", making it seem as if the program was letting you move during a time it thought that you couldn't move. Also, there was nothing "sudden" about it since it was near the end of a 15 or so turn sequence where a few other messages are given leading up to that. Change it to T-2: You are about to vomit. // different wording T-0: You vomit! // new message so that "you can move again" more clearly refers to the actual event. --- doc/fixes36.1 | 3 +++ src/eat.c | 12 +++++++++--- src/timeout.c | 13 +++++++++++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 968b720fe..03bfc8dbc 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -440,6 +440,9 @@ if leash or unleash attempt was directed at "remembered, unseen monster" glyph wizmode level teleport menu indicates on what level you currently are fix invisible gold symbol in status line when S_coin was set to space fix buffer overflow in wizard mode for '#' command when 'extmenu' option is on +"you suddenly vomit" was given two turns before actually vomiting, so you + could get that message, move a bit, then get "you can move again" + after the 2 turn freeze applied along with the actual vomit Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/src/eat.c b/src/eat.c index c5f7c2c6d..9bd6346b0 100644 --- a/src/eat.c +++ b/src/eat.c @@ -3129,9 +3129,15 @@ vomit() /* A good idea from David Neves */ Your("jaw gapes convulsively."); else make_sick(0L, (char *) 0, TRUE, SICK_VOMITABLE); - nomul(-2); - multi_reason = "vomiting"; - nomovemsg = You_can_move_again; + + /* nomul()/You_can_move_again used to be unconditional, which was + viable while eating but not for Vomiting countdown where hero might + be immobilized for some other reason at the time vomit() is called */ + if (multi >= -2) { + nomul(-2); + multi_reason = "vomiting"; + nomovemsg = You_can_move_again; + } } int diff --git a/src/timeout.c b/src/timeout.c index c0bc89bc6..a9262abf0 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -145,13 +145,13 @@ stoned_dialogue() exercise(A_DEX, FALSE); } -/* He is getting sicker and sicker prior to vomiting */ +/* hero is getting sicker and sicker prior to vomiting */ static NEARDATA const char *const vomiting_texts[] = { "are feeling mildly nauseated.", /* 14 */ "feel slightly confused.", /* 11 */ "can't seem to think straight.", /* 8 */ "feel incredibly sick.", /* 5 */ - "suddenly vomit!" /* 2 */ + "are about to vomit." /* 2 */ }; STATIC_OVL void @@ -189,11 +189,20 @@ vomiting_dialogue() txt = vomiting_texts[4]; if (cantvomit(youmonst.data)) txt = "gag uncontrolably."; + else if (Hallucination) + /* "hurl" is short for "hurl chunks" which is slang for + relatively violent vomiting... */ + txt = "are about to hurl!"; break; case 0: stop_occupation(); if (!cantvomit(youmonst.data)) morehungry(20); + /* case 2 used to be "You suddenly vomit!" but it wasn't sudden + since you've just been through the earlier messages of the + countdown, and it was still possible to move around between + that message and vomit() -> numul(-2) -> "You can move again." */ + You("vomit!"); vomit(); break; default: -- 2.50.1