From 5713f92df151e35ec14fdce6af3d8bf6d3f57f6a Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 13 Jul 2016 16:16:55 -0700 Subject: [PATCH] fix #H4436 - polyself message sequencing bug for digesting a swallowed critter. The "you kill " message was left implicit, but if hero gained a level, that made "welcome to level N+1" look like it was issued out of sequence because it's immediate and the "you totally digest " is delayed. Giving the you-kill-it message explicitly makes things be more verbose but avoids having the new-level message seem out of order. --- doc/fixes36.1 | 2 ++ src/uhitm.c | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index f2faf576c..aef6c5289 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -320,6 +320,8 @@ monsters can throw cockatrice eggs at hero, but there was no handling for eggs when the missile hit an intervening monster clarify that shape-shifted vampires revert to vampire form when petrified or digested; when back in 'V' form, they're vulnerable to such damage +when poly'd into an engulfer which does digestion damage, a kill resulting in + a level gain gave "welcome to level N+1" before "you digest " Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/src/uhitm.c b/src/uhitm.c index d377791c2..1217b5b48 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1949,11 +1949,13 @@ register struct attack *mattk; m_useup(mdef, otmp); newuhs(FALSE); - /* Message sequencing BUG: if you gain a level here, - * "welcome to level N+1" is given immediately and - * then "you totally digest " is given later. - */ - xkilled(mdef, XKILL_NOMSG | XKILL_NOCORPSE); + /* start_engulf() issues "you engulf " above; this + used to specify XKILL_NOMSG but we need "you kill " + in case we're also going to get "welcome to level N+1"; + "you totally digest " will be coming soon (after + several turns) but the level-gain message seems out of + order if the kill message is left implicit */ + xkilled(mdef, XKILL_GIVEMSG | XKILL_NOCORPSE); if (mdef->mhp > 0) { /* monster lifesaved */ You("hurriedly regurgitate the sizzling in your %s.", body_part(STOMACH)); -- 2.40.0