/*
+ * Determine if a "legal" grid is a "droppable" grid
+ *
+ * Line 1 -- forbid non-drops
+ * Line 2 -- forbid object terrains
+ * Line 3 -- forbid normal objects
+ */
+#define cave_droppable_bold(Y,X) \
+ (have_flag(f_flags_bold((Y), (X)), FF_DROP) && \
+ !(cave[Y][X].info & CAVE_OBJECT) && \
+ !(cave[Y][X].o_idx))
+
+
+/*
* Determine if a "legal" grid is an "empty" floor grid
*
* Line 1 -- forbid non-placement grids
c_ptr = &cave[y][x];
/* Must be a "naked" floor grid */
- if (!cave_clean_bold(y, x) || c_ptr->m_idx) continue;
- if (!in_bounds(y,x)) continue;
+ 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 (!player_can_enter(c_ptr->feat, 0)) continue;
+ if (!in_bounds(y, x)) continue;
/* Refuse to start on anti-teleport grids */
if (c_ptr->info & (CAVE_ICKY)) continue;
if (!in_bounds(y, x)) return;
/* Require clean floor space */
- if (!cave_clean_bold(y, x)) return;
+ if (!cave_droppable_bold(y, x)) return;
/* Get local object */
if (!in_bounds(y, x)) return;
/* Require clean floor space */
- if (!cave_clean_bold(y, x)) return;
+ if (!cave_droppable_bold(y, x)) return;
/* Get local object */
bx = tx;
/* Require floor space */
- if (!cave_clean_bold(by, bx)) continue;
+ if (!cave_droppable_bold(by, bx)) continue;
/* Okay */
flag = TRUE;
bool warding_glyph(void)
{
/* XXX XXX XXX */
- if (!cave_clean_bold(py, px))
+ if (!cave_droppable_bold(py, px) || !have_flag(f_flags_bold(py, px), FF_PROJECT))
{
#ifdef JP
msg_print("¾²¾å¤Î¥¢¥¤¥Æ¥à¤¬¼öʸ¤òÄ·¤ÍÊÖ¤·¤¿¡£");
bool warding_mirror(void)
{
/* XXX XXX XXX */
- if (!cave_clean_bold(py, px))
+ if (!cave_droppable_bold(py, px) || !have_flag(f_flags_bold(py, px), FF_PROJECT))
{
#ifdef JP
msg_print("¾²¾å¤Î¥¢¥¤¥Æ¥à¤¬¼öʸ¤òÄ·¤ÍÊÖ¤·¤¿¡£");