]> granicus.if.org Git - nethack/commitdiff
finally finished but not eating
authorcohrs <cohrs>
Fri, 25 Mar 2005 18:00:00 +0000 (18:00 +0000)
committercohrs <cohrs>
Fri, 25 Mar 2005 18:00:00 +0000 (18:00 +0000)
Finally apply the patch sent by <Someone> in 11/2003 for slashem-Bugs-799278,
updated to match the current code and handle additional cases.  The fix
is brute force: always ensure nomovemsg is set when nomul is called with
a negative value.  I also scanned the code for places manually setting
multi negative, they all set nomovemsg.  It would be nice to have a function
that did the right thing, but there are several special cases and I was
not feeling creative.

12 files changed:
doc/fixes34.4
src/apply.c
src/dothrow.c
src/eat.c
src/mcastu.c
src/polyself.c
src/pray.c
src/sounds.c
src/spell.c
src/steal.c
src/timeout.c
src/uhitm.c

index f0cea27da7bd9eaa1f635e6fc001922b08a420c6..07d2016c9a943e729a83ec7ab0777c9f9024d936 100644 (file)
@@ -102,6 +102,8 @@ avoid giving away wand type for near misses while blind
 avoid excessive repetition of "monsters are aware of your presence"
 monster's aggravation spell now affects meditating monsters
 busy pet won't miss out upon ascension
+fix various places that "finally finished" could be displayed after the hero
+       stopped doing something other than eating
 
 
 Platform- and/or Interface-Specific Fixes
index 5f0e3301b3c4ec05ef1a7fb4da34feedaa8ed323..5beb356154f86f04b00436aee719913a406de096 100644 (file)
@@ -704,6 +704,7 @@ struct obj *obj;
                              "Yow!  The mirror stares back!" :
                              "Yikes!  You've frozen yourself!");
                        nomul(-rnd((MAXULEV+6) - u.ulevel));
+                       nomovemsg = 0;
                        } else You("stiffen momentarily under your gaze.");
                    } else if (youmonst.data->mlet == S_VAMPIRE)
                        You("don't have a reflection.");
index c35c82963653f910bfd516994373621eb3dcc6f9..9a735236a4968bcbb22515816a1900e4b1097fdb 100644 (file)
@@ -633,6 +633,7 @@ hurtle(dx, dy, range, verbose)
     if(!range || (!dx && !dy) || u.ustuck) return; /* paranoia */
 
     nomul(-range);
+    nomovemsg = 0;
     if (verbose)
        You("%s in the opposite direction.", range > 1 ? "hurtle" : "float");
     /* if we're in the midst of shooting multiple projectiles, stop */
index 212bc3591c73a2ece05d0ad6df35aecffc9e6d77..278d5e6615cdd374f5c69687b7febd24ca5f3bac 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -2590,6 +2590,7 @@ vomit()           /* A good idea from David Neves */
 {
        make_sick(0L, (char *) 0, TRUE, SICK_VOMITABLE);
        nomul(-2);
+       nomovemsg = 0;
 }
 
 int
index c5079059c5346a38a54fbc4dbf492afcf3212cd8..ddcbf72c2c43c45e4fd93382c1012fd3b87059ae 100644 (file)
@@ -606,6 +606,7 @@ int spellnum;
            if (Half_spell_damage) dmg = (dmg + 1) / 2;
            nomul(-dmg);
        }
+       nomovemsg = 0;
        dmg = 0;
        break;
     case CLC_CONFUSE_YOU:
index b480f2e632118275bec085c7d49238db8b8de206..18432a3563aa4a921e08b7f3e5c66025740cbcd9 100644 (file)
@@ -1043,6 +1043,7 @@ dogaze()
                                    -d((int)mtmp->m_lev+1,
                                            (int)mtmp->data->mattk[0].damd)
                                    : -200);
+                           nomovemsg = 0;
                            return 1;
                        } else
                            You("stiffen momentarily under %s gaze.",
index ac6cf255de6c442cd12d5abcd520bbbc07592bca..5c3d772bb7f296092648b1f3e03b4749dd417a02 100644 (file)
@@ -1207,6 +1207,7 @@ dosacrifice()
                        dmon->mpeaceful = TRUE;
                    You("are terrified, and unable to move.");
                    nomul(-3);
+                   nomovemsg = 0;
                } else pline_The("%s.", demonless_msg);
            }
 
@@ -1737,6 +1738,7 @@ doturn()
            }
        }
        nomul(-5);
+       nomovemsg = 0;
        return(1);
 }
 
index 23c763971e8ab06d1d5137c515e0f932c76db4bd..da555808ba72b4f4583e0c98c7f51edf7d57b864 100644 (file)
@@ -619,6 +619,7 @@ register struct monst *mtmp;
            pline("%s rattles noisily.", Monnam(mtmp));
            You("freeze for a moment.");
            nomul(-2);
+           nomovemsg = 0;
            break;
        case MS_LAUGH:
            {
index 7d4e22efb4e31a992bff436196b3c89be3578cf0..a0bb838d94571a5b82416844aa799c8eb6130a4a 100644 (file)
@@ -326,7 +326,8 @@ learn()
            (void) confused_book(context.spbook.book);
            context.spbook.book = 0;                    /* no longer studying */
            context.spbook.o_id = 0;
-           nomul(context.spbook.delay);                /* remaining delay is uninterrupted */
+           nomul(context.spbook.delay); /* remaining delay is uninterrupted */
+           nomovemsg = 0;
            context.spbook.delay = 0;
            return(0);
        }
@@ -466,7 +467,8 @@ register struct obj *spellbook;
                if (too_hard) {
                    boolean gone = cursed_book(spellbook);
 
-                   nomul(context.spbook.delay);                        /* study time */
+                   nomul(context.spbook.delay);        /* study time */
+                   nomovemsg = 0;
                    context.spbook.delay = 0;
                    if(gone || !rn2(3)) {
                        if (!gone) pline_The("spellbook crumbles to dust!");
@@ -482,6 +484,7 @@ register struct obj *spellbook;
                        spellbook->in_use = FALSE;
                    }
                    nomul(context.spbook.delay);
+                   nomovemsg = 0;
                    context.spbook.delay = 0;
                    return(1);
                }
index 361dac8b12d180963b683130b403654474e359d3..7043daad4644af49a113077889b33ddd0321b998 100644 (file)
@@ -391,12 +391,12 @@ gotobj:
                        named++;
                        /* the following is to set multi for later on */
                        nomul(-armordelay);
+                       nomovemsg = 0;
                        remove_worn_item(otmp, TRUE);
                        otmp->cursed = curssv;
-                       if(multi < 0){
+                       if(multi < 0) {
                                /*
                                multi = 0;
-                               nomovemsg = 0;
                                afternmv = 0;
                                */
                                stealoid = otmp->o_id;
index 24434a78d2b0ff1ca2c136a6c2657b3a6d6a4296..b712a03fafab766dae636623e77965fecaa7db19 100644 (file)
@@ -44,6 +44,7 @@ stoned_dialogue()
        case 3:         /* limbs turned to stone */
                stop_occupation();
                nomul(-3);      /* can't move anymore */
+               nomovemsg = 0;
                break;
        default:
                break;
@@ -1239,6 +1240,7 @@ do_storms()
        if(!u.uinvulnerable) {
            stop_occupation();
            nomul(-3);
+           nomovemsg = 0;
        }
     } else
        You_hear("a rumbling noise.");
index bb1ca6c67b9e9985386cfb202695f0b69f91299b..ac3405a3b8c143f351c2d4604b27331799208a1d 100644 (file)
@@ -2317,6 +2317,7 @@ boolean wep_was_destroyed;
                            You("are frozen by %s gaze!",
                                  s_suffix(mon_nam(mon)));
                            nomul((ACURR(A_WIS) > 12 || rn2(4)) ? -tmp : -127);
+                           nomovemsg = 0;
                        }
                    } else {
                        pline("%s cannot defend itself.",