From 5b91f815331fea7eefd5439c6c2bddc259cff687 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 27 Oct 2021 16:21:03 -0700 Subject: [PATCH] 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. --- doc/fixes37.0 | 1 + src/mkmaze.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 4bbba792c..e21072f9d 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -673,6 +673,7 @@ when creating random contents for a container, explicitly exclude artifacts don't give lance or mattock as starting equipment when creating soldiers fixup for the insect "legs" (some extraneous walls inside solid stone) on the baalz level didn't work as intended if that level was flipped +handle flipped level when fixing up the baalz level "eyes" too Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/mkmaze.c b/src/mkmaze.c index a67a810ed..c27385d35 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -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),