fix #H4275 - blinded, stunned, confused timers

Blindness due to face covered by pie was ignored for several cases
of magically curing blindness--cleaning the face seems better than
adjusting timeout to account for u.ucreamed for those cases.  A few
instances of taking stun or confusion damage overrode existing stun
or confusion rather than increasing it.  Plus a copy/paste mistake
for dual stun+confusion when casting an expired spell.

There was also a suggestion that vomiting when already nauseated
should decrement the timer instead of increasing it.  But there is a
negative effect for as long as it's in effect, so I left that as is.
This commit is contained in:
PatR
2016-03-15 01:00:36 -07:00
parent 77fe8db320
commit 13c40d85e7
7 changed files with 33 additions and 8 deletions

View File

@@ -289,7 +289,7 @@ worst_cursed_item()
} else if (uright && uright->cursed) { /* right ring */
otmp = uright;
} else if (ublindf && ublindf->cursed) { /* eyewear */
otmp = ublindf; /* must be non-blinding lenses */
otmp = ublindf; /* must be non-blinding lenses */
/* if weapon wasn't handled above, do it now */
} else if (welded(uwep)) { /* weapon */
otmp = uwep;
@@ -1048,8 +1048,15 @@ aligntyp g_align;
ABASE(A_STR) = AMAX(A_STR);
if (u.uhunger < 900)
init_uhunger();
/* luck couldn't have been negative at start of prayer because
the prayer would have failed, but might have been decremented
due to a timed event (delayed death of peaceful monster hit
by hero-created stinking cloud) during the praying interval */
if (u.uluck < 0)
u.uluck = 0;
/* superfluous; if hero was blinded we'd be handling trouble
rather than issuing a pat-on-head */
u.ucreamed = 0;
make_blinded(0L, TRUE);
context.botl = 1;
break;