OSDN Git Service

Changed Japanese translation for "New" to match what was suggested in hengbandforosx...
[hengbandforosx/hengbandosx.git] / src / spells-floor.c
index 5c6b36f..6c6aa57 100644 (file)
@@ -27,7 +27,7 @@ void wiz_lite(bool ninja)
        /* Memorize objects */
        for (i = 1; i < o_max; i++)
        {
-               object_type *o_ptr = &o_list[i];
+               object_type *o_ptr = &current_floor_ptr->o_list[i];
 
                /* Skip dead objects */
                if (!o_ptr->k_idx) continue;
@@ -40,12 +40,12 @@ void wiz_lite(bool ninja)
        }
 
        /* Scan all normal grids */
-       for (y = 1; y < cur_hgt - 1; y++)
+       for (y = 1; y < current_floor_ptr->height - 1; y++)
        {
                /* Scan all normal grids */
-               for (x = 1; x < cur_wid - 1; x++)
+               for (x = 1; x < current_floor_ptr->width - 1; x++)
                {
-                       grid_type *g_ptr = &grid_array[y][x];
+                       grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
 
                        /* Memorize terrain of the grid */
                        g_ptr->info |= (CAVE_KNOWN);
@@ -62,7 +62,7 @@ void wiz_lite(bool ninja)
                                {
                                        POSITION yy = y + ddy_ddd[i];
                                        POSITION xx = x + ddx_ddd[i];
-                                       g_ptr = &grid_array[yy][xx];
+                                       g_ptr = &current_floor_ptr->grid_array[yy][xx];
 
                                        /* Feature code (applying "mimic" field) */
                                        f_ptr = &f_info[get_feat_mimic(g_ptr)];
@@ -101,7 +101,7 @@ void wiz_lite(bool ninja)
 
        if (p_ptr->special_defense & NINJA_S_STEALTH)
        {
-               if (grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+               if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
        }
 }
 
@@ -115,11 +115,11 @@ void wiz_dark(void)
        POSITION y, x;
 
        /* Forget every grid */
-       for (y = 1; y < cur_hgt - 1; y++)
+       for (y = 1; y < current_floor_ptr->height - 1; y++)
        {
-               for (x = 1; x < cur_wid - 1; x++)
+               for (x = 1; x < current_floor_ptr->width - 1; x++)
                {
-                       grid_type *g_ptr = &grid_array[y][x];
+                       grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
 
                        /* Process the grid */
                        g_ptr->info &= ~(CAVE_MARK | CAVE_IN_DETECT | CAVE_KNOWN);
@@ -128,23 +128,23 @@ void wiz_dark(void)
        }
 
        /* Forget every grid on horizontal edge */
-       for (x = 0; x < cur_wid; x++)
+       for (x = 0; x < current_floor_ptr->width; x++)
        {
-               grid_array[0][x].info &= ~(CAVE_MARK);
-               grid_array[cur_hgt - 1][x].info &= ~(CAVE_MARK);
+               current_floor_ptr->grid_array[0][x].info &= ~(CAVE_MARK);
+               current_floor_ptr->grid_array[current_floor_ptr->height - 1][x].info &= ~(CAVE_MARK);
        }
 
        /* Forget every grid on vertical edge */
-       for (y = 1; y < (cur_hgt - 1); y++)
+       for (y = 1; y < (current_floor_ptr->height - 1); y++)
        {
-               grid_array[y][0].info &= ~(CAVE_MARK);
-               grid_array[y][cur_wid - 1].info &= ~(CAVE_MARK);
+               current_floor_ptr->grid_array[y][0].info &= ~(CAVE_MARK);
+               current_floor_ptr->grid_array[y][current_floor_ptr->width - 1].info &= ~(CAVE_MARK);
        }
 
        /* Forget all objects */
        for (i = 1; i < o_max; i++)
        {
-               object_type *o_ptr = &o_list[i];
+               object_type *o_ptr = &current_floor_ptr->o_list[i];
 
                /* Skip dead objects */
                if (!o_ptr->k_idx) continue;
@@ -165,3 +165,77 @@ void wiz_dark(void)
        p_ptr->redraw |= (PR_MAP);
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 }
+
+/*!
+ * @brief 守りのルーン設置処理 /
+ * Leave a "glyph of warding" which prevents monster movement
+ * @return 実際に設置が行われた場合TRUEを返す
+ */
+bool warding_glyph(void)
+{
+       if (!cave_clean_bold(p_ptr->y, p_ptr->x))
+       {
+               msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
+               return FALSE;
+       }
+
+       /* Create a glyph */
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT;
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].mimic = feat_glyph;
+
+       note_spot(p_ptr->y, p_ptr->x);
+       lite_spot(p_ptr->y, p_ptr->x);
+
+       return TRUE;
+}
+
+
+/*!
+ * @brief 爆発のルーン設置処理 /
+ * Leave an "explosive rune" which prevents monster movement
+ * @return 実際に設置が行われた場合TRUEを返す
+ */
+bool explosive_rune(void)
+{
+       if (!cave_clean_bold(p_ptr->y, p_ptr->x))
+       {
+               msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
+               return FALSE;
+       }
+
+       /* Create a glyph */
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT;
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].mimic = feat_explosive_rune;
+
+       note_spot(p_ptr->y, p_ptr->x);
+       lite_spot(p_ptr->y, p_ptr->x);
+
+       return TRUE;
+}
+
+
+/*!
+ * @brief 鏡設置処理
+ * @return 実際に設置が行われた場合TRUEを返す
+ */
+bool place_mirror(void)
+{
+       if (!cave_clean_bold(p_ptr->y, p_ptr->x))
+       {
+               msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
+               return FALSE;
+       }
+
+       /* Create a mirror */
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT;
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].mimic = feat_mirror;
+
+       /* Turn on the light */
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_GLOW;
+
+       note_spot(p_ptr->y, p_ptr->x);
+       lite_spot(p_ptr->y, p_ptr->x);
+       update_local_illumination(p_ptr->y, p_ptr->x);
+
+       return TRUE;
+}