trunk only: preserving context (src files)

Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.

This patch:
- collects all context/tracking related fields from flags
  into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
This commit is contained in:
nethack.allison
2003-09-21 11:52:54 +00:00
parent 74b834c774
commit 22ce5ed6f2
58 changed files with 571 additions and 567 deletions

View File

@@ -211,7 +211,7 @@ dead: /* we come directly here if their experience level went to 0 or less */
Your("body transforms, but there is still slime on you.");
Slimed = 10L;
}
flags.botl = 1;
context.botl = 1;
see_monsters();
(void) encumber_msg();
}
@@ -411,11 +411,11 @@ int mntmp;
mntmp == PM_SALAMANDER || mntmp == PM_FLAMING_SPHERE) {
pline_The("slime burns away!");
Slimed = 0L;
flags.botl = 1;
context.botl = 1;
} else if (mntmp == PM_GREEN_SLIME) {
/* do it silently */
Slimed = 0L;
flags.botl = 1;
context.botl = 1;
}
}
if (nohands(youmonst.data)) Glib = 0;
@@ -563,7 +563,7 @@ int mntmp;
You("orient yourself on the web.");
u.utrap = 0;
}
flags.botl = 1;
context.botl = 1;
vision_full_recalc = 1;
see_monsters();
exercise(A_CON, FALSE);
@@ -736,7 +736,7 @@ rehumanize()
if (!uarmg) selftouch("No longer petrify-resistant, you");
nomul(0);
flags.botl = 1;
context.botl = 1;
vision_full_recalc = 1;
(void) encumber_msg();
}
@@ -755,7 +755,7 @@ dobreathe()
return(0);
}
u.uen -= 15;
flags.botl = 1;
context.botl = 1;
if (!getdir((char *)0)) return(0);
@@ -921,7 +921,7 @@ dosummon()
return(0);
}
u.uen -= 10;
flags.botl = 1;
context.botl = 1;
You("call upon your brethren for help!");
exercise(A_WIS, TRUE);
@@ -960,7 +960,7 @@ dogaze()
return(0);
}
u.uen -= 15;
flags.botl = 1;
context.botl = 1;
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
if (DEADMONSTER(mtmp)) continue;
@@ -1086,7 +1086,7 @@ domindblast()
return(0);
}
u.uen -= 10;
flags.botl = 1;
context.botl = 1;
You("concentrate.");
pline("A wave of psychic energy pours out.");
@@ -1286,7 +1286,7 @@ int damtype, dam;
if (heal && (u.mh < u.mhmax)) {
u.mh += heal;
if (u.mh > u.mhmax) u.mh = u.mhmax;
flags.botl = 1;
context.botl = 1;
pline("Strangely, you feel better than before.");
exercise(A_STR, TRUE);
}