Skip to content

Commit

Permalink
finally finished but not eating
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cohrs committed Mar 25, 2005
1 parent 916a636 commit e367964
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/fixes34.4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down
1 change: 1 addition & 0 deletions src/dothrow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions src/eat.c
Original file line number Diff line number Diff line change
Expand Up @@ -2590,6 +2590,7 @@ vomit() /* A good idea from David Neves */
{
make_sick(0L, (char *) 0, TRUE, SICK_VOMITABLE);
nomul(-2);
nomovemsg = 0;
}

int
Expand Down
1 change: 1 addition & 0 deletions src/mcastu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions src/polyself.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
2 changes: 2 additions & 0 deletions src/pray.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -1737,6 +1738,7 @@ doturn()
}
}
nomul(-5);
nomovemsg = 0;
return(1);
}

Expand Down
1 change: 1 addition & 0 deletions src/sounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
{
Expand Down
7 changes: 5 additions & 2 deletions src/spell.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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!");
Expand All @@ -482,6 +484,7 @@ register struct obj *spellbook;
spellbook->in_use = FALSE;
}
nomul(context.spbook.delay);
nomovemsg = 0;
context.spbook.delay = 0;
return(1);
}
Expand Down
4 changes: 2 additions & 2 deletions src/steal.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,12 +391,12 @@ char *objnambuf;
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;
Expand Down
2 changes: 2 additions & 0 deletions src/timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1239,6 +1240,7 @@ do_storms()
if(!u.uinvulnerable) {
stop_occupation();
nomul(-3);
nomovemsg = 0;
}
} else
You_hear("a rumbling noise.");
Expand Down
1 change: 1 addition & 0 deletions src/uhitm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down

0 comments on commit e367964

Please sign in to comment.