B01003 - blindfold vs dust vortex

This started out as a change to address the strange sequence of messages if
you remove a blindfold while engulfed in a dust vortex.  That is addressed
by a new function that can be called in such situations.  Calls to this
function were added in all the cases where the can_blnd() engulfing
conditions end as a result of player action.  There are some other cases
that end ucreamed or usleep, but they happen between turns and shouldn't
need extra handling.

While I was at it, I noticed that a unicorn horn or prayer would cure
blindness even while engulfed in a dust vortex.  This is useless, because
you immediately get blind again the next turn.  So, I added checks to avoid
doing this.  Finally, it didn't make sense for eating a carrot to cure your
blindness in these situations either, only for it to return immediately.
This commit is contained in:
cohrs
2003-03-26 05:10:22 +00:00
parent 39befe07fd
commit 345ffcfaec
8 changed files with 56 additions and 19 deletions

View File

@@ -134,21 +134,23 @@ use_towel(obj)
}
if (Glib) {
Glib = 0;
You("wipe off your %s.", makeplural(body_part(HAND)));
return 1;
Glib = 0;
You("wipe off your %s.", makeplural(body_part(HAND)));
return 1;
} else if(u.ucreamed) {
Blinded -= u.ucreamed;
u.ucreamed = 0;
Blinded -= u.ucreamed;
u.ucreamed = 0;
if (!Blinded) {
pline("You've got the glop off.");
Blinded = 1;
make_blinded(0L,TRUE);
} else {
Your("%s feels clean now.", body_part(FACE));
if (!Blinded) {
pline("You've got the glop off.");
if (!gulp_blnd_check()) {
Blinded = 1;
make_blinded(0L,TRUE);
}
return 1;
} else {
Your("%s feels clean now.", body_part(FACE));
}
return 1;
}
Your("%s and %s are already clean.",
@@ -1476,7 +1478,10 @@ struct obj *obj;
/* collect property troubles */
if (Sick) prop_trouble(SICK);
if (Blinded > (long)u.ucreamed) prop_trouble(BLINDED);
if (Blinded > (long)u.ucreamed &&
!(u.uswallow &&
attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND)))
prop_trouble(BLINDED);
if (HHallucination) prop_trouble(HALLUC);
if (Vomiting) prop_trouble(VOMITING);
if (HConfusion) prop_trouble(CONFUSION);