diff options
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r-- | crawl-ref/source/monplace.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc index 569181f0af..c1572cc0f7 100644 --- a/crawl-ref/source/monplace.cc +++ b/crawl-ref/source/monplace.cc @@ -134,8 +134,9 @@ bool monster_can_submerge(int monster_class, int grid) } bool place_monster(int &id, int mon_type, int power, char behaviour, - int target, bool summoned, int px, int py, bool allow_bands, - int proximity, int extra, int dur) + int target, bool summoned, int px, int py, bool allow_bands, + int proximity, int extra, int dur, + const dgn_region_list &forbidden) { int band_size = 0; int band_monsters[BIG_BAND]; // band monster types @@ -286,7 +287,8 @@ bool place_monster(int &id, int mon_type, int power, char behaviour, tries = 0; } } - else if (tries > 60) + // Dropped number of tries from 60. + else if (tries > 45) return (false); px = 5 + random2(GXM - 10); @@ -303,6 +305,10 @@ bool place_monster(int &id, int mon_type, int power, char behaviour, if (!grid_compatible(grid_wanted, grd[px][py], true)) continue; + // Is the grid verboten? + if (!unforbidden( coord_def(px, py), forbidden )) + continue; + // don't generate monsters on top of teleport traps // (how did they get there?) int trap = trap_at_xy(px, py); |