/* Must be a "naked" floor grid */
if (c_ptr->m_idx) continue;
- if (!have_flag(f_flags_grid(c_ptr), FF_MOVE) && !have_flag(f_flags_grid(c_ptr), FF_CAN_FLY)) continue;
+ if (!have_flag(f_flags_grid(c_ptr), FF_MOVE)) continue;
if (!player_can_enter(c_ptr->feat, 0)) continue;
if (!in_bounds(y, x)) continue;
/* Floor type terrain cannot hide a door */
if (feat_supports_los(c_ptr->mimic) && !feat_supports_los(c_ptr->feat))
{
- if (have_flag(f_info[c_ptr->mimic].flags, FF_MOVE)) c_ptr->feat = c_ptr->mimic;
+ if (have_flag(f_info[c_ptr->mimic].flags, FF_MOVE) || have_flag(f_info[c_ptr->mimic].flags, FF_CAN_FLY))
+ {
+ c_ptr->feat = one_in_(2) ? c_ptr->mimic : floor_type[randint0(100)];
+ }
c_ptr->mimic = 0;
}
}
c_ptr = &cave[tmp_row][tmp_col];
f_ptr = &f_info[c_ptr->feat];
- if (have_flag(f_ptr->flags, FF_WALL) && have_flag(f_ptr->flags, FF_PERMANENT))
+ if (permanent_wall(f_ptr))
{
/* Avoid the edge of vaults */
if (is_inner_grid(c_ptr)) continue;
feat = c_ptr->feat;
f_ptr = &f_info[feat];
- if (have_flag(f_ptr->flags, FF_WALL) && have_flag(f_ptr->flags, FF_PERMANENT))
- {
- /*
- * Ignore permanent walls - sometimes cannot tunnel around them anyway
- * so don't try - it just complicates things unnecessarily.
- */
- return TRUE;
- }
-
if (is_inner_grid(c_ptr))
{
return TRUE;