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:
18
src/mhitu.c
18
src/mhitu.c
@@ -1588,6 +1588,24 @@ dopois:
|
||||
#endif /* OVL1 */
|
||||
#ifdef OVLB
|
||||
|
||||
/* An interface for use when taking a blindfold off, for example,
|
||||
* to see if an engulfing attack should immediately take affect, like
|
||||
* a passive attack. TRUE if engulfing blindness occurred */
|
||||
boolean
|
||||
gulp_blnd_check()
|
||||
{
|
||||
struct attack *mattk;
|
||||
|
||||
if (!Blinded && u.uswallow &&
|
||||
(mattk = attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND)) &&
|
||||
can_blnd(u.ustuck, &youmonst, mattk->aatyp, (struct obj*)0)) {
|
||||
++u.uswldtim; /* compensate for gulpmu change */
|
||||
(void) gulpmu(u.ustuck, mattk);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
STATIC_OVL int
|
||||
gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */
|
||||
register struct monst *mtmp;
|
||||
|
||||
Reference in New Issue
Block a user