diff options
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index ec18719873..d17b46d5e4 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -807,6 +807,7 @@ static int _place_monster_aux( const mgen_data &mg, // Setup habitat and placement. // If the space is occupied, try some neighbouring square instead. if (first_band_member && in_bounds(mg.pos) + && (mg.behaviour == BEH_FRIENDLY || !is_sanctuary(mg.pos.x, mg.pos.y)) && (force_pos || mgrd(mg.pos) == NON_MONSTER && mg.pos != you.pos() && monster_habitable_grid(htype, grd(mg.pos)))) { @@ -833,6 +834,9 @@ static int _place_monster_aux( const mgen_data &mg, if (!grid_compatible(grid_wanted, grd(fpos), true)) continue; + if (mg.behaviour != BEH_FRIENDLY && is_sanctuary(fpos.x, fpos.y)) + continue; + // Don't generate monsters on top of teleport traps. // (How do they get there?) int trap = trap_at_xy(fpos.x, fpos.y); |