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

@@ -1499,6 +1499,7 @@ when you hear a monster incant a scroll, ensure that the 'I' invisible
monster indicator doesn't trump telepathy briefly
proceed with showpaths option even if the sysconf file is missing
angry shopkeeper was not charging for thrown items
avoid "You fall down a deep shaft!" if deliberately flying down
Fixes to 3.7.0-x General Problems Exposed Via git Repository

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)