level teleporters vs Ft.Ludios

From newsgroup discussion where slash'em changes have revealed a
latent nethack bug:  prevent placing level teleporters in single-
level branches.  The Knox level doesn't have any level teleporters
(or random traps) but wizard mode wishing could create them there.
They wouldn't do anything because the only possible destination
would be the same level.  Pushing a boulder onto one used to trigger
an infinite loop (and still does in slash'em, which has other
single-level branches besides Ft.Ludios) trying to relocate it.

Boulder pushing was changed 15 years ago to prevent the infinite
loop and to avoid giving "the boulder disappears" message when a
level teleporter failed, but rolling boulder traversal lacked that
same change--it wasn't vulnerable to looping but could give an
inaccurate message claiming that the boulder disappeared when it
actually didn't.  Fixing this is a bit late; rolling boulder trap
creation was recently changed to not choose a path that rolls over
teleportation or level tele traps any more.
This commit is contained in:
PatR
2021-04-12 13:25:52 -07:00
parent a8388c8cb5
commit 8bd08ebb71
7 changed files with 53 additions and 27 deletions

View File

@@ -618,6 +618,7 @@ extern boolean On_W_tower_level(d_level *);
extern boolean In_W_tower(int, int, d_level *);
extern void find_hell(d_level *);
extern void goto_hell(boolean, boolean);
extern boolean single_level_branch(d_level *);
extern void assign_level(d_level *, d_level *);
extern void assign_rnd_level(d_level *, d_level *, int);
extern unsigned int induced_align(int);