More globals moved to instance_globals.

This commit is contained in:
Bart House
2018-12-19 21:26:35 -08:00
parent b7a0e69998
commit 576eece500
65 changed files with 498 additions and 505 deletions

View File

@@ -537,7 +537,7 @@ register struct monst *mtmp;
pline("Wait, %s! That %s is really %s named %s!", m_monnam(mtmp),
mimic_obj_name(&youmonst), an(mons[u.umonnum].mname),
plname);
if (multi < 0) { /* this should always be the case */
if (g.multi < 0) { /* this should always be the case */
char buf[BUFSZ];
Sprintf(buf, "You appear to be %s again.",
@@ -551,7 +551,7 @@ register struct monst *mtmp;
/* Work out the armor class differential */
tmp = AC_VALUE(u.uac) + 10; /* tmp ~= 0 - 20 */
tmp += mtmp->m_lev;
if (multi < 0)
if (g.multi < 0)
tmp += 4;
if ((Invis && !perceives(mdat)) || !mtmp->mcansee)
tmp -= 2;
@@ -780,7 +780,7 @@ register struct monst *mtmp;
/* give player a chance of waking up before dying -kaa */
if (sum[i] == 1) { /* successful attack */
if (u.usleep && u.usleep < monstermoves && !rn2(10)) {
multi = -1;
g.multi = -1;
nomovemsg = "The combat suddenly awakens you.";
}
}
@@ -1083,7 +1083,7 @@ register struct attack *mattk;
break;
case AD_SLEE:
hitmsg(mtmp, mattk);
if (uncancelled && multi >= 0 && !rn2(5)) {
if (uncancelled && g.multi >= 0 && !rn2(5)) {
if (Sleep_resistance)
break;
fall_asleep(-rnd(10), TRUE);
@@ -1157,7 +1157,7 @@ register struct attack *mattk;
break;
case AD_PLYS:
hitmsg(mtmp, mattk);
if (uncancelled && multi >= 0 && !rn2(3)) {
if (uncancelled && g.multi >= 0 && !rn2(3)) {
if (Free_action) {
You("momentarily stiffen.");
} else {
@@ -1167,7 +1167,7 @@ register struct attack *mattk;
You("are frozen by %s!", mon_nam(mtmp));
nomovemsg = You_can_move_again;
nomul(-rnd(10));
multi_reason = "paralyzed by a monster";
g.multi_reason = "paralyzed by a monster";
exercise(A_DEX, FALSE);
}
}
@@ -2252,7 +2252,7 @@ struct attack *mattk;
#ifdef PM_BEHOLDER /* work in progress */
case AD_SLEE:
if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my) && mtmp->mcansee
&& multi >= 0 && !rn2(5) && !Sleep_resistance) {
&& g.multi >= 0 && !rn2(5) && !Sleep_resistance) {
if (cancelled) {
react = 6; /* "tired" */
already = (mtmp->mfrozen != 0); /* can't happen... */