OSDN Git Service

ス、ケヤチホ、ホケス、ィチェツニ、モスミ、キ, キムイネ、ホキソチェツニ、モスミ、キ、ホコル、ォ、、ス、タオ.
[hengband/hengband.git] / src / cave.c
index 0d8ae30..b781a52 100644 (file)
@@ -626,41 +626,6 @@ bool cave_valid_bold(int y, int x)
 
 
 /*
- * Determine if a given location may be "destroyed"
- *
- * Used by destruction spells, and for placing stairs, etc.
- */
-bool cave_valid_grid(cave_type *c_ptr)
-{
-       s16b this_o_idx, next_o_idx = 0;
-
-
-       /* Forbid perma-grids */
-       if (cave_perma_grid(c_ptr)) return (FALSE);
-
-       /* Check objects */
-       for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
-       {
-               object_type *o_ptr;
-
-               /* Acquire object */
-               o_ptr = &o_list[this_o_idx];
-
-               /* Acquire next object */
-               next_o_idx = o_ptr->next_o_idx;
-
-               /* Forbid artifact grids */
-               if (object_is_artifact(o_ptr)) return (FALSE);
-       }
-
-       /* Accept */
-       return (TRUE);
-}
-
-
-
-
-/*
  * Hack -- Legal monster codes
  */
 static char image_monster_hack[] = \
@@ -3068,14 +3033,14 @@ void update_mon_lite(void)
                        if (!rad) continue;
                        else if (rad > 0)
                        {
-                               if (!(r_ptr->flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2)) && (m_ptr->csleep || (!dun_level && is_daytime()) || p_ptr->inside_battle)) continue;
+                               if (!(r_ptr->flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2)) && (MON_CSLEEP(m_ptr) || (!dun_level && is_daytime()) || p_ptr->inside_battle)) continue;
                                if (d_info[dungeon_type].flags1 & DF1_DARKNESS) rad = 1;
                                add_mon_lite = mon_lite_hack;
                                f_flag = FF_LOS;
                        }
                        else
                        {
-                               if (!(r_ptr->flags7 & (RF7_SELF_DARK_1 | RF7_SELF_DARK_2)) && (m_ptr->csleep || (!dun_level && !is_daytime()))) continue;
+                               if (!(r_ptr->flags7 & (RF7_SELF_DARK_1 | RF7_SELF_DARK_2)) && (MON_CSLEEP(m_ptr) || (!dun_level && !is_daytime()))) continue;
                                add_mon_lite = mon_dark_hack;
                                f_flag = FF_PROJECT;
                                rad = -rad; /* Use absolute value */