finally finished but not eating

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.
This commit is contained in:
cohrs
2005-03-25 18:00:00 +00:00
parent 916a636fe3
commit e367964f90
12 changed files with 20 additions and 4 deletions

View 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.");

View 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 */

View File

@@ -2590,6 +2590,7 @@ vomit() /* A good idea from David Neves */
{
make_sick(0L, (char *) 0, TRUE, SICK_VOMITABLE);
nomul(-2);
nomovemsg = 0;
}
int

View 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:

View 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.",

View 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);
}

View 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:
{

View 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);
}

View 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;

View 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.");

View 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.",