* Line 1 -- forbid non-empty grids
* Line 2 -- forbid trees while dungeon generation
*/
-#define cave_empty_bold2(Y,X) \
- (cave_empty_bold(p_ptr->current_floor_ptr, Y,X) && \
+#define cave_empty_bold2(F,Y,X) \
+ (cave_empty_bold(F,Y,X) && \
(current_world_ptr->character_dungeon || !cave_have_flag_bold((Y), (X), FF_TREE)))
do
{
scatter(&wy, &wx, y, x, 20, 0);
- } while (!(in_bounds(p_ptr->current_floor_ptr, wy, wx) && cave_empty_bold2(wy, wx)) && --attempts);
+ } while (!(in_bounds(p_ptr->current_floor_ptr, wy, wx) && cave_empty_bold2(p_ptr->current_floor_ptr, wy, wx)) && --attempts);
if (attempts > 0)
{
else
{
/* Walls and Monsters block flow */
- if (!cave_empty_bold2(ny, nx)) continue;
+ if (!cave_empty_bold2(p_ptr->current_floor_ptr, ny, nx)) continue;
/* ... nor on the Pattern */
if (pattern_tile(ny, nx)) continue;
scatter(&my, &mx, hy, hx, 4, 0);
/* Walls and Monsters block flow */
- if (!cave_empty_bold2(my, mx)) continue;
+ if (!cave_empty_bold2(p_ptr->current_floor_ptr, my, mx)) continue;
/* Attempt to place another monster */
if (place_monster_one(who, my, mx, r_idx, mode))
scatter(&ny, &nx, y, x, d, 0);
/* Require empty grids */
- if (!cave_empty_bold2(ny, nx)) continue;
+ if (!cave_empty_bold2(p_ptr->current_floor_ptr, ny, nx)) continue;
get_mon_num_prep(place_monster_can_escort, get_monster_hook2(ny, nx));
/* Pick a random race */
ox = randint1(p_ptr->current_floor_ptr->width - 4) + 2;
/* Is it a good spot ? */
- if (cave_empty_bold2(oy, ox) && monster_can_cross_terrain(p_ptr->current_floor_ptr->grid_array[oy][ox].feat, &r_info[guardian], 0))
+ if (cave_empty_bold2(p_ptr->current_floor_ptr, oy, ox) && monster_can_cross_terrain(p_ptr->current_floor_ptr->grid_array[oy][ox].feat, &r_info[guardian], 0))
{
/* Place the guardian */
if (place_monster_aux(0, oy, ox, guardian, (PM_ALLOW_GROUP | PM_NO_KAGE | PM_NO_PET))) return TRUE;
/* Require empty floor grid (was "naked") */
if (p_ptr->current_floor_ptr->dun_level)
{
- if (!cave_empty_bold2(y, x)) continue;
+ if (!cave_empty_bold2(p_ptr->current_floor_ptr, y, x)) continue;
}
else
{
scatter(&my, &mx, caster_ptr->y, caster_ptr->x, 4, 0);
/* Require empty grids */
- if (cave_empty_bold2(my, mx)) break;
+ if (cave_empty_bold2(p_ptr->current_floor_ptr, my, mx)) break;
}
if (attempt < 0) continue;
summon_specific(-1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE));