more things considered when you're on the brink

This commit is contained in:
nhmall
2019-11-29 11:14:55 -05:00
parent 059e0277ff
commit fd7d0f5d52
9 changed files with 31 additions and 15 deletions

View File

@@ -5104,11 +5104,21 @@ boolean
uteetering_at_seen_pit(trap)
struct trap *trap;
{
if (trap && trap->tseen && (!u.utrap || u.utraptype != TT_PIT)
&& is_pit(trap->ttyp))
return TRUE;
else
return FALSE;
return (trap && is_pit(trap->ttyp) && trap->tseen
&& trap->tx == u.ux && trap->ty == u.uy
&& !(u.utrap && u.utraptype == TT_PIT));
}
/*
* Returns TRUE if you didn't fall through a hole or didn't
* release a trap door
*/
boolean
uescaped_shaft(trap)
struct trap *trap;
{
return (trap && is_hole(trap->ttyp) && trap->tseen
&& trap->tx == u.ux && trap->ty == u.uy);
}
/* Destroy a trap that emanates from the floor. */