Rework stairs structure

Use a linked list to store stair and ladder information, instead
of having fixed up/down stairs/ladders and a single "special" (branch)
stair.

Breaks saves and bones.

Adds information to migrating objects and monsters for the dungeon
and level where they are migrating from.
This commit is contained in:
Pasi Kallinen
2020-11-09 18:50:02 +02:00
parent e23f764d11
commit 6ec55a3624
34 changed files with 552 additions and 361 deletions

View File

@@ -2327,11 +2327,15 @@ register struct monst *mtmp;
#endif
if (mtmp->data->mlet == S_KOP) {
stairway *stway = stairway_find_type_dir(FALSE, FALSE);
/* Dead Kops may come back. */
switch (rnd(5)) {
case 1: /* returns near the stairs */
(void) makemon(mtmp->data, xdnstair, ydnstair, NO_MM_FLAGS);
break;
if (stway) {
(void) makemon(mtmp->data, stway->sx, stway->sy, NO_MM_FLAGS);
break;
}
case 2: /* randomly */
(void) makemon(mtmp->data, 0, 0, NO_MM_FLAGS);
break;