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

@@ -1502,7 +1502,9 @@ struct obj *obj;
make_confused(HConfusion + d(2, 4), FALSE);
} else if (!rn2(4) && !Blind) {
pline("Everything suddenly goes dark.");
make_blinded((long) d(2, 10), FALSE);
/* hero is not Blind, but Blinded timer might be nonzero if
blindness is being overridden by the Eyes of the Overworld */
make_blinded((Blinded & TIMEOUT) + (long) d(2, 10), FALSE);
if (!Blind)
Your1(vision_clears);
} else if (!rn2(3)) {
@@ -1785,6 +1787,9 @@ struct obj *otmp;
#endif
} else if (otmp->otyp == EGG && stale_egg(otmp)) {
pline("Ugh. Rotten egg."); /* perhaps others like it */
/* increasing existing nausea means that it will take longer
before eventual vomit, but also means that constitution
will be abused more times before illness completes */
make_vomiting((Vomiting & TIMEOUT) + (long) d(10, 4), TRUE);
} else {
give_feedback: