OSDN Git Service

los()やplayer_has_los_*()の使用に関する変更. 主に透明な壁の作成を想定
[hengband/hengband.git] / src / cmd6.c
index 84cf8ac..e085d19 100644 (file)
@@ -2431,7 +2431,7 @@ static int staff_effect(int sval, bool *use_charge, bool magic, bool known)
                                {
                                        scatter(&y, &x, py, px, 4, 0);
 
-                                       if (!cave_floor_bold(y, x)) continue;
+                                       if (!have_flag(f_flags_bold(y, x), FF_PROJECT)) continue;
 
                                        if (!player_bold(y, x)) break;
                                }
@@ -4401,7 +4401,7 @@ msg_print("
                                        {
                                                scatter(&y, &x, py, px, 4, 0);
 
-                                               if (!cave_floor_bold(y, x)) continue;
+                                               if (!have_flag(f_flags_bold(y, x), FF_PROJECT)) continue;
 
                                                if (!player_bold(y, x)) break;
                                        }
@@ -5525,6 +5525,7 @@ msg_print("
                                                if (!m_ptr->r_idx) continue;
                                                if (!((m_ptr->r_idx == MON_SUKE) || (m_ptr->r_idx == MON_KAKU))) continue;
                                                if (!los(m_ptr->fy, m_ptr->fx, py, px)) continue;
+                                               if (!projectable(m_ptr->fy, m_ptr->fx, py, px)) continue;
                                                count++;
                                                break;
                                        }
@@ -6334,7 +6335,7 @@ msg_print("
                                o_ptr->timeout = randint0(50) + 50;
                                break;
                        case EGO_AMU_D_DOOR:
-                               (void)dimension_door(FALSE);
+                               (void)dimension_door();
                                o_ptr->timeout = 200;
                                break;
                        case EGO_AMU_RES_FIRE_:
@@ -6473,7 +6474,7 @@ msg_print("
                {
                        bool success = FALSE;
                        if (!get_rep_dir2(&dir)) return;
-                       if (cave_floor_bold(py+ddy[dir],px+ddx[dir]))
+                       if (monster_can_enter(py + ddy[dir], px + ddx[dir], &r_info[o_ptr->pval], 0))
                        {
                                if (place_monster_aux(0, py + ddy[dir], px + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
                                {