]> granicus.if.org Git - nethack/commitdiff
fix #H4436 - polyself message sequencing bug
authorPatR <rankin@nethack.org>
Wed, 13 Jul 2016 23:16:55 +0000 (16:16 -0700)
committerPatR <rankin@nethack.org>
Wed, 13 Jul 2016 23:16:55 +0000 (16:16 -0700)
for digesting a swallowed critter.  The "you kill <critter>" 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 <critter>" 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
src/uhitm.c

index f2faf576c78d623db210e4fc9419a4d448de72ad..aef6c5289de3d7f491cfc8c9c6044c516dcda154 100644 (file)
@@ -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 <victim>"
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index d377791c276eeada4c5be5417f34dc98e4375c96..1217b5b486eaadef8733185e19e1cc82396db04b 100644 (file)
@@ -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 <foo>" is given later.
-                 */
-                xkilled(mdef, XKILL_NOMSG | XKILL_NOCORPSE);
+                /* start_engulf() issues "you engulf <mdef>" above; this
+                   used to specify XKILL_NOMSG but we need "you kill <mdef>"
+                   in case we're also going to get "welcome to level N+1";
+                   "you totally digest <mdef>" 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));