Prevent phaseable monster hiding deep in undiggable walls
The outer edge of a random dungeon level can have undiggable walls. Phaseable monsters, such as earth elementals, could hide deep inside that boundary. Turn the walls beyond the first layer of non-diggable walls also non-phaseable.
This commit is contained in:
@@ -1592,6 +1592,7 @@ one orc-town shaman has a higher level, affecting spellcasting
|
||||
hero has a small chance of catching items thrown at them
|
||||
wizard mode: history menu for #wizwish and WIZKIT
|
||||
monster priests and wizards did not cast spells
|
||||
prevent phaseable monsters hiding deep inside nondiggable walls
|
||||
|
||||
|
||||
Fixes to 3.7.0-x General Problems Exposed Via git Repository
|
||||
|
||||
16
src/mkmaze.c
16
src/mkmaze.c
@@ -1426,8 +1426,9 @@ get_level_extends(
|
||||
*bottom = ymax;
|
||||
}
|
||||
|
||||
/* put a non-diggable boundary around the initial portion of a level map.
|
||||
* assumes that no level will initially put things beyond the isok() range.
|
||||
/* put a non-diggable/non-phaseable boundary around the initial portion
|
||||
* of a level map. assumes that no level will initially put things
|
||||
* beyond the isok() range.
|
||||
*
|
||||
* we can't bound unconditionally on the last line with something in it,
|
||||
* because that something might be a niche which was already reachable,
|
||||
@@ -1449,9 +1450,14 @@ bound_digging(void)
|
||||
|
||||
for (x = 0; x < COLNO; x++)
|
||||
for (y = 0; y < ROWNO; y++)
|
||||
if (IS_STWALL(levl[x][y].typ)
|
||||
&& (y <= ymin || y >= ymax || x <= xmin || x >= xmax))
|
||||
levl[x][y].wall_info |= W_NONDIGGABLE;
|
||||
if (IS_STWALL(levl[x][y].typ)) {
|
||||
/* undiggable walls at edges, ... */
|
||||
if (y <= ymin || y >= ymax || x <= xmin || x >= xmax)
|
||||
levl[x][y].wall_info |= W_NONDIGGABLE;
|
||||
/* one tile past that, everything is also unphaseable */
|
||||
if (y < ymin || y > ymax || x < xmin || x > xmax)
|
||||
levl[x][y].wall_info |= W_NONPASSWALL;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user