ceiling hiders vs '>'

Poly'd hero hiding on the ceiling was told "you can't go down here"
if using '>' at a spot that didn't have down stairs, trap door, hole,
or pit.  Let '>' bring a ceiling hider out of hiding; lurker above
resumes flying, piercer falls to floor or whatever is underneath it.
This commit is contained in:
PatR
2019-12-17 19:08:26 -08:00
parent 512f886ca6
commit 8349d95992
5 changed files with 44 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 trap.c $NHDT-Date: 1576635243 2019/12/18 02:14:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.328 $ */
/* NetHack 3.6 trap.c $NHDT-Date: 1576638501 2019/12/18 03:08:21 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.329 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -489,8 +489,9 @@ unsigned ftflags;
; /* KMH -- You can't escape the Sokoban level traps */
else if (Levitation || u.ustuck
|| (!Can_fall_thru(&u.uz) && !levl[u.ux][u.uy].candig)
|| ((Flying || is_clinger(youmonst.data))
&& !(ftflags & TOOKPLUNGE))
|| ((Flying || is_clinger(youmonst.data)
|| (ceiling_hider(youmonst.data) && u.uundetected))
&& !(ftflags & TOOKPLUNGE))
|| (Inhell && !u.uevent.invoked && newlevel == bottom)) {
dont_fall = "don't fall in.";
} else if (youmonst.data->msize >= MZ_HUGE) {
@@ -5388,7 +5389,10 @@ sink_into_lava()
static const char sink_deeper[] = "You sink deeper into the lava.";
if (!u.utrap || u.utraptype != TT_LAVA) {
; /* do nothing; this shouldn't happen */
; /* do nothing; this usually won't happen but could after
* polymorphing from a flier into a ceiling hider and then hiding;
* allmain() only checks whether the hero is at a lava location,
* not whether he or she is currently sinking */
} else if (!is_lava(u.ux, u.uy)) {
reset_utrap(FALSE); /* this shouldn't happen either */
} else if (!u.uinvulnerable) {