wizard mode enlightenment tweaks + Glow status fix

For extended monster detection, show the number of turns remaining
during enlightenment (wizard mode only).  The value is also
available via #timeout but various enlightenment entries already do
something like this.

For confuse monster, show the number of hits left for glowing hands
(again, wizard mode only).

And for the latter, the 3.7 conditional status condition set up was
storing u.umconf, an unsigned int, into contests[bl_glowhands].test,
a boolean, so would yield the wrong value if glowing hands managed
to become high enough to be a multiple of 256 (assumes 8-bit char
for boolean).
This commit is contained in:
PatR
2021-07-24 11:30:52 -07:00
parent 120a8c0173
commit 2e43f83db0
2 changed files with 32 additions and 17 deletions

View File

@@ -880,13 +880,13 @@ bot_via_windowport(void)
#endif
}
}
condtests[bl_blind].test = (Blind);
condtests[bl_blind].test = (Blind) ? TRUE : FALSE;
condtests[bl_conf].test = (Confusion) ? TRUE : FALSE;
condtests[bl_deaf].test = (Deaf);
condtests[bl_fly].test = (Flying);
condtests[bl_glowhands].test = (u.umconf);
condtests[bl_hallu].test = (Hallucination);
condtests[bl_lev].test = (Levitation);
condtests[bl_deaf].test = (Deaf) ? TRUE : FALSE;
condtests[bl_fly].test = (Flying) ? TRUE : FALSE;
condtests[bl_glowhands].test = (u.umconf) ? TRUE : FALSE;
condtests[bl_hallu].test = (Hallucination) ? TRUE : FALSE;
condtests[bl_lev].test = (Levitation) ? TRUE : FALSE;
condtests[bl_ride].test = (u.usteed) ? TRUE : FALSE;
condtests[bl_slime].test = (Slimed) ? TRUE : FALSE;
condtests[bl_stone].test = (Stoned) ? TRUE : FALSE;
@@ -897,7 +897,7 @@ bot_via_windowport(void)
test_if_enabled(bl_bareh) = (!uarmg && !uwep);
test_if_enabled(bl_icy) = (levl[u.ux][u.uy].typ == ICE);
test_if_enabled(bl_slippery) = (Glib) ? TRUE : FALSE;
test_if_enabled(bl_woundedl) = (Wounded_legs);
test_if_enabled(bl_woundedl) = (Wounded_legs) ? TRUE : FALSE;
if (g.multi < 0) {
cond_cache_prepA();