concealing unknown branch stairs

First cut at displaying branch stairs/ladder up/down as ordinary
stairs/ladder up/down if the destination hasn't been visited yet.

Stepping on stairs with 'mention_decor' enabled, or using ':' when
already on them, will report regular stairs' destination level.
Probably not very useful since it's just N+1 for downstairs or N-1
for upstairs when currently on level N.

It's based on whether the destination level has been visited, not
on whether the stairs have been traversed, so reaching a level via
trap or level teleporation can make the level's stairs known when
their destination really shouldn't be discovered yet.
This commit is contained in:
PatR
2021-07-29 03:32:58 -07:00
parent 7bfbe0fba9
commit f2019e2ec6
4 changed files with 65 additions and 14 deletions

View File

@@ -1856,14 +1856,14 @@ back_to_glyph(xchar x, xchar y)
break;
case STAIRS:
sway = stairway_at(x, y);
if (sway && (sway->tolev.dnum != u.uz.dnum))
if (known_branch_stairs(sway, (char *) 0, FALSE))
idx = (ptr->ladder & LA_DOWN) ? S_brdnstair : S_brupstair;
else
idx = (ptr->ladder & LA_DOWN) ? S_dnstair : S_upstair;
break;
case LADDER:
sway = stairway_at(x, y);
if (sway && (sway->tolev.dnum != u.uz.dnum))
if (known_branch_stairs(sway, (char *) 0, FALSE))
idx = (ptr->ladder & LA_DOWN) ? S_brdnladder : S_brupladder;
else
idx = (ptr->ladder & LA_DOWN) ? S_dnladder : S_upladder;