Prevent monster generation in the sokoban trap hallway

Makes Sokoban far less tedious when you don't have to worry about
monsters randomly popping up in the trap hallway while you're pushing
the boulder.

Adds a new exclusion zone for monster generation, and the goodpos
routine avoids the zones when GP_AVOID_MONPOS is used.
This commit is contained in:
Pasi Kallinen
2024-10-18 13:26:43 +03:00
parent 9e4b2c121b
commit f12635ccd9
16 changed files with 45 additions and 9 deletions

View File

@@ -39,7 +39,8 @@ enum level_region_types {
LR_BRANCH,
LR_TELE,
LR_UPTELE,
LR_DOWNTELE
LR_DOWNTELE,
LR_MONGEN,
};
typedef struct dest_area { /* non-stairway level change identifier */

View File

@@ -1552,6 +1552,7 @@ extern void bound_digging(void);
extern void mkportal(coordxy, coordxy, xint16, xint16);
extern boolean bad_location(coordxy, coordxy, coordxy, coordxy, coordxy,
coordxy);
extern boolean is_exclusion_zone(xint16, coordxy, coordxy);
/* dungeon.c u_on_rndspot() passes NULL final arg to place_lregion() */
extern void place_lregion(coordxy, coordxy, coordxy, coordxy, coordxy,
coordxy, coordxy, coordxy, xint16, d_level *) NO_NNARGS;
@@ -3075,6 +3076,8 @@ extern boolean goodpos(coordxy, coordxy, struct monst *,
mmflags_nht) NO_NNARGS;
extern boolean enexto(coord *, coordxy, coordxy,
struct permonst *) NONNULLARG1;
extern boolean enexto_gpflags(coord *, coordxy, coordxy, struct permonst *,
mmflags_nht) NONNULLARG1;
extern boolean enexto_core(coord *, coordxy, coordxy, struct permonst *,
mmflags_nht) NONNULLARG1;
extern void teleds(coordxy, coordxy, int);