fix #H7585 - can't untrap from edge of pit

Attempting to untrap an adjacent location failed if you had escaped a
pit, claiming that you couldn't reach.  You can't reach the bottom of
the pit if you're not in it, but you should be able to reach adjacent
spots normally.
This commit is contained in:
PatR
2018-11-21 19:16:23 -08:00
parent 55ad316079
commit ac9bdc8aa7
2 changed files with 4 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 trap.c $NHDT-Date: 1542765365 2018/11/21 01:56:05 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.303 $ */
/* NetHack 3.6 trap.c $NHDT-Date: 1542856572 2018/11/22 03:16:12 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.304 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -4038,7 +4038,7 @@ boolean force_failure;
}
}
/* untrappable traps are located on the ground. */
if (!can_reach_floor(TRUE)) {
if (!can_reach_floor(under_u)) {
if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
rider_cant_reach();
else