Add some stair helper functions
This commit is contained in:
14
src/dig.c
14
src/dig.c
@@ -1645,8 +1645,7 @@ char *msg;
|
||||
} else if (IS_SINK(ltyp)) {
|
||||
Strcpy(msg, "A tangled mass of plumbing remains below the sink.");
|
||||
return FALSE;
|
||||
} else if ((cc->x == xupladder && cc->y == yupladder) /* ladder up */
|
||||
|| (cc->x == xdnladder && cc->y == ydnladder)) { /* " down */
|
||||
} else if (On_ladder(cc->x, cc->y)) {
|
||||
Strcpy(msg, "The ladder is unaffected.");
|
||||
return FALSE;
|
||||
} else {
|
||||
@@ -1658,15 +1657,8 @@ char *msg;
|
||||
supporting = "throne";
|
||||
else if (IS_ALTAR(ltyp))
|
||||
supporting = "altar";
|
||||
else if ((cc->x == xupstair && cc->y == yupstair)
|
||||
|| (cc->x == g.sstairs.sx && cc->y == g.sstairs.sy
|
||||
&& g.sstairs.up))
|
||||
/* "staircase up" */
|
||||
supporting = "stairs";
|
||||
else if ((cc->x == xdnstair && cc->y == ydnstair)
|
||||
|| (cc->x == g.sstairs.sx && cc->y == g.sstairs.sy
|
||||
&& !g.sstairs.up))
|
||||
/* "staircase down" */
|
||||
else if (On_stairs(cc->x, cc->y))
|
||||
/* staircase up or down. On_ladder handled above. */
|
||||
supporting = "stairs";
|
||||
else if (ltyp == DRAWBRIDGE_DOWN /* "lowered drawbridge" */
|
||||
|| ltyp == DBWALL) /* "raised drawbridge" */
|
||||
|
||||
Reference in New Issue
Block a user