if (distance(y1, x1, y, x)>2) continue;
/* ...nor on the Pattern */
- if ((cave[y][x].feat >= FEAT_PATTERN_START)
- && (cave[y][x].feat <= FEAT_PATTERN_XTRA2)) continue;
+ if (pattern_tile(y, x)) continue;
- /* Require empty floor grid in line of sight */
- if ((cave_empty_bold(y, x) || (cave[y][x].feat == FEAT_TREES)) && los(y1, x1, y, x) && los(y, x, y1, x1)) return (TRUE);
+ /* Require empty floor grid in line of projection */
+ if (cave_empty_bold(y, x) && projectable(y1, x1, y, x) && projectable(y, x, y1, x1)) return (TRUE);
}
}
{
if (distance(y, x, yy, xx) > 5) continue;
if (!los(y, x, yy, xx)) continue;
+ if (!projectable(y, x, yy, xx)) continue;
c_ptr = &cave[yy][xx];
/* Scan the pile of objects */
{
if (new_curse & TRC_HEAVY_MASK) continue;
}
- if (((o_ptr->tval < TV_BOW) || (o_ptr->tval > TV_SWORD)) && (new_curse == TRC_LOW_MELEE)) continue;
- if (((o_ptr->tval < TV_BOOTS) || (o_ptr->tval > TV_DRAG_ARMOR)) && (new_curse == TRC_LOW_AC)) continue;
+ if (((o_ptr->tval < TV_WEAPON_BEGIN) || (o_ptr->tval > TV_WEAPON_END)) && (new_curse == TRC_LOW_MELEE)) continue;
+ if (((o_ptr->tval < TV_ARMOR_BEGIN) || (o_ptr->tval > TV_ARMOR_END)) && (new_curse == TRC_LOW_AC)) continue;
break;
}
return new_curse;
object_flags(o_ptr, oflgs);
- object_desc(o_name, o_ptr, FALSE, 0);
+ object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
/* Extra, biased saving throw for blessed items */
if (have_flag(oflgs, TR_BLESSED) && (randint1(888) > chance))
if (r_ptr->flags4 & RF4_BR_FIRE)
{
- if (!(prace_is_(RACE_DEMON) && p_ptr->lev > 44))
+ if (!((p_ptr->prace == RACE_DEMON) && p_ptr->lev > 44))
{
if (!p_ptr->immune_fire && (p_ptr->oppose_fire || music_singing(MUSIC_RESIST))) return (TRUE);
if (p_ptr->special_defense & DEFENSE_FIRE) return (TRUE);
if (projectable(m_ptr->fy, m_ptr->fx, y, x))
{
/* Breath disintegration to the glyph if possible */
- if ((!cave_floor_bold(y,x)) && (r_ptr->flags4 & RF4_BR_DISI) && one_in_(2)) do_disi = TRUE;
+ if (!have_flag(f_flags_bold(y, x), FF_PROJECT) && (f4 & RF4_BR_DISI) && one_in_(2)) do_disi = TRUE;
}
/* Check path to next grid */
{
bool success = FALSE;
- if ((r_ptr->flags4 & RF4_BR_DISI) &&
+ if ((f4 & RF4_BR_DISI) &&
(m_ptr->cdis < MAX_RANGE/2) &&
in_disintegration_range(m_ptr->fy, m_ptr->fx, y, x) &&
(one_in_(10) || (projectable(y, x, m_ptr->fy, m_ptr->fx) && one_in_(2))))
/* Access the next grid */
c_ptr = &cave[next_y][next_x];
- /* Skip door, rubble, wall */
- if ((c_ptr->feat >= FEAT_DOOR_HEAD) && (c_ptr->feat <= FEAT_PERM_SOLID)) continue;
-
- /* Skip tree */
- if (c_ptr->feat == FEAT_TREES) continue;
-
- /* Skip mountain */
- if (c_ptr->feat == FEAT_MOUNTAIN) continue;
+ /* Skip door, rubble, wall, tree, mountain, etc. */
+ if (!have_flag(f_flags_grid(c_ptr), FF_PROJECT)) continue;
if (projectable(m_ptr->fy, m_ptr->fx, next_y, next_x))
{
#endif
teleport_away(m_idx, 10, FALSE);
- p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);
+ p_ptr->update |= (PU_MONSTERS);
break;
}
msg_format("%^s suddenly go out of your sight!", m_name);
#endif
teleport_away(m_idx, 10, FALSE);
- p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);
+ p_ptr->update |= (PU_MONSTERS);
}
else
{
for (k = 0; k < 30; k++)
{
- if (!summon_possible(cy, cx) || !cave_floor_bold(cy, cx))
+ if (!summon_possible(cy, cx) || !cave_empty_bold(cy, cx))
{
int j;
for (j = 100; j > 0; j--)
{
scatter(&cy, &cx, y, x, 2, 0);
- if (cave_floor_bold(cy, cx)) break;
+ if (cave_empty_bold(cy, cx)) break;
}
if (!j) break;
}
- if (!cave_floor_bold(cy, cx)) continue;
+ if (!cave_empty_bold(cy, cx)) continue;
if (summon_named_creature(m_idx, cy, cx, MON_NAZGUL, mode))
{