more baalz - digging in front of the "eyes"

like the leg hackery, if the baalz level gets flipped during creation
the fixup that modifies the locations in front of the eyes to allow
digging needs to deal with that too.
This commit is contained in:
PatR
2021-10-27 16:21:03 -07:00
parent a5d3e03b3e
commit 5b91f81533
2 changed files with 12 additions and 3 deletions

View File

@@ -404,9 +404,17 @@ baalz_fixup(void)
g.bughack.delarea.x2 = x, g.bughack.delarea.y2 = y;
} else if (levl[x][y].typ == IRONBARS) {
/* novelty effect; allowing digging in front of 'eyes' */
levl[x - 1][y].wall_info &= ~W_NONDIGGABLE;
if (isok(x - 2, y))
levl[x - 2][y].wall_info &= ~W_NONDIGGABLE;
if (isok(x - 1, y)
&& (levl[x - 1][y].wall_info & W_NONDIGGABLE) != 0) {
levl[x - 1][y].wall_info &= ~W_NONDIGGABLE;
if (isok(x - 2, y))
levl[x - 2][y].wall_info &= ~W_NONDIGGABLE;
} else if (isok(x + 1, y)
&& (levl[x + 1][y].wall_info & W_NONDIGGABLE) != 0) {
levl[x + 1][y].wall_info &= ~W_NONDIGGABLE;
if (isok(x + 2, y))
levl[x + 2][y].wall_info &= ~W_NONDIGGABLE;
}
}
wallification(max(g.bughack.inarea.x1 - 2, 1),