bundle the display-related hints, that tell bot() and others

that an update is required, into a struct. Remove it from
context since there is no reason to save those.
This commit is contained in:
nhmall
2024-01-04 23:16:27 -05:00
parent 9bcff7b896
commit 22e52ee905
46 changed files with 246 additions and 238 deletions

View File

@@ -1203,7 +1203,7 @@ spelleffects_check(int spell, int *res, int *energy)
u.uen -= rnd(*energy);
if (u.uen < 0)
u.uen = 0;
gc.context.botl = 1;
display.botl = 1;
*res = ECMD_TIME;
return TRUE;
} else if (spellknow(spell) <= KEEN / 200) { /* 100 turns left */
@@ -1246,7 +1246,7 @@ spelleffects_check(int spell, int *res, int *energy)
u.uen -= rnd(2 * *energy);
if (u.uen < 0)
u.uen = 0;
gc.context.botl = 1;
display.botl = 1;
*res = ECMD_TIME; /* time is used even if spell doesn't get cast */
}
@@ -1320,7 +1320,7 @@ spelleffects_check(int spell, int *res, int *energy)
if (confused || (rnd(100) > chance)) {
You("fail to cast the spell correctly.");
u.uen -= *energy / 2;
gc.context.botl = 1;
display.botl = 1;
*res = ECMD_TIME;
return TRUE;
}
@@ -1343,7 +1343,7 @@ spelleffects(int spell_otyp, boolean atme, boolean force)
return res;
u.uen -= energy;
gc.context.botl = 1;
display.botl = 1;
exercise(A_WIS, TRUE);
/* pseudo is a temporary "false" object containing the spell stats */
pseudo = mksobj(force ? spell : spellid(spell), FALSE, FALSE);