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

@@ -362,6 +362,13 @@ register boolean nearshop;
{
coord mm;
stairway *stway = g.stairs;
while (stway) {
if (!stway->isladder && !stway->up && stway->tolev.dnum == u.uz.dnum)
break;
stway = stway->next;
}
if (nearshop) {
/* Create swarm around you, if you merely "stepped out" */
@@ -375,8 +382,8 @@ register boolean nearshop;
if (flags.verbose)
pline_The("Keystone Kops are after you!");
/* Create swarm near down staircase (hinders return to level) */
mm.x = xdnstair;
mm.y = ydnstair;
mm.x = stway->sx;
mm.y = stway->sy;
makekops(&mm);
/* Create swarm near shopkeeper (hinders return to shop) */
mm.x = shkp->mx;