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 do.c $NHDT-Date: 1576181796 2019/12/12 20:16:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.197 $ */
/* NetHack 3.6 do.c $NHDT-Date: 1576638499 2019/12/18 03:08:19 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.198 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1000,6 +1000,24 @@ dodown()
: surface(u.ux, u.uy));
return 0; /* didn't move */
}
if (Upolyd && ceiling_hider(&mons[u.umonnum]) && u.uundetected) {
u.uundetected = 0;
if (Flying) { /* lurker above */
You("fly out of hiding.");
} else { /* piercer */
You("drop to the %s.", surface(u.ux, u.uy));
if (is_pool_or_lava(u.ux, u.uy)) {
pooleffects(FALSE);
} else {
(void) pickup(1);
if ((trap = t_at(u.ux, u.uy)) != 0)
dotrap(trap, TOOKPLUNGE);
}
}
return 1; /* came out of hiding; might need '>' again to go down */
}
if (!stairs_down && !ladder_down) {
trap = t_at(u.ux, u.uy);
if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {