avoid "You fall down a deep shaft!" if flying down

Fixes #1371
This commit is contained in:
nhmall
2025-02-03 00:53:06 -05:00
parent d65d0062a9
commit 785f78c39b
2 changed files with 9 additions and 2 deletions

View File

@@ -608,6 +608,7 @@ fall_through(
const char *dont_fall = 0;
int newlevel;
struct trap *t = (struct trap *) 0;
boolean controlled_flight = FALSE;
/* we'll fall even while levitating in Sokoban; otherwise, if we
won't fall and won't be told that we aren't falling, give up now */
@@ -653,12 +654,15 @@ fall_through(
return;
}
if ((Flying || is_clinger(gy.youmonst.data))
&& (ftflags & TOOKPLUNGE) && td && t)
&& (ftflags & TOOKPLUNGE) && td && t) {
if (Flying)
controlled_flight = TRUE;
You("%s down %s!",
Flying ? "swoop" : "deliberately drop",
(t->ttyp == TRAPDOOR)
? "through the trap door"
: "into the gaping hole");
}
if (*u.ushops)
shopdig(1);
@@ -678,7 +682,9 @@ fall_through(
}
dist = depth(&dtmp) - depth(&u.uz);
if (dist > 1)
You("fall down a %s%sshaft!", dist > 3 ? "very " : "",
You("%s down a %s%sshaft!",
controlled_flight ? "fly" : "fall",
dist > 3 ? "very " : "",
dist > 2 ? "deep " : "");
}
if (!td)