OSDN Git Service

[Refactor] #40581 Separated summon_self() from on_dead_dawn() and on_dead_totem_moai()
authorHourier <hourier@users.sourceforge.jp>
Fri, 21 Aug 2020 08:44:07 +0000 (17:44 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 21 Aug 2020 08:44:07 +0000 (17:44 +0900)
16 files changed:
src/dungeon/quest-completion-checker.c
src/effect/effect-characteristics.h
src/floor/floor-changer.c
src/mind/mind-ninja.c
src/monster-floor/monster-generator.c
src/monster-floor/monster-generator.h
src/monster-floor/monster-summon.c
src/monster-floor/monster-summon.h
src/monster-floor/special-death-switcher.c
src/mspell/specified-summon.c
src/object-activation/activation-bolt-ball.c
src/player/player-status.c
src/realm/realm-crusade.c
src/spell-kind/spells-neighbor.c
src/spell/summon-types.h
src/wizard/wizard-spells.c

index 718e647..7cc8ace 100644 (file)
@@ -1,6 +1,7 @@
 #include "dungeon/quest-completion-checker.h"
 #include "core/player-update-types.h"
 #include "dungeon/quest.h"
+#include "effect/effect-characteristics.h"
 #include "floor/cave.h"
 #include "floor/floor-object.h"
 #include "floor/floor-util.h"
@@ -154,7 +155,7 @@ void check_quest_completion(player_type *player_ptr, monster_type *m_ptr)
     if (create_stairs) {
         POSITION ny, nx;
         while (cave_have_flag_bold(floor_ptr, y, x, FF_PERMANENT) || floor_ptr->grid_array[y][x].o_idx || (floor_ptr->grid_array[y][x].info & CAVE_OBJECT)) {
-            scatter(player_ptr, &ny, &nx, y, x, 1, 0);
+            scatter(player_ptr, &ny, &nx, y, x, 1, PROJECT_NONE);
             y = ny;
             x = nx;
         }
index 777f54b..963e97c 100644 (file)
@@ -4,6 +4,7 @@
  * project()関数に用いられる、遠隔攻撃特性ビットフラグ / Bit flags for the "project()" function
  */
 typedef enum effect_characteristics {
+    PROJECT_NONE = 0x0000,
     PROJECT_JUMP = 0x0001, /*!< 発動者からの軌跡を持たず、指定地点に直接発生する(予め置いたトラップ、上空からの発生などのイメージ) / Jump directly to the target location (this is a hack) */
     PROJECT_BEAM = 0x0002, /*!< ビーム範囲を持つ。 / Work as a beam weapon (affect every grid passed through) */
     PROJECT_THRU = 0x0004, /*!< 目標地点に到達しても射程と遮蔽の限り引き延ばす。 / Continue "through" the target (used for "bolts"/"beams") */
index 457d6e4..cc06206 100644 (file)
@@ -3,6 +3,7 @@
 #include "dungeon/dungeon.h"
 #include "dungeon/quest-monster-placer.h"
 #include "dungeon/quest.h"
+#include "effect/effect-characteristics.h"
 #include "floor/floor-generator.h"
 #include "floor/floor-mode-changer.h"
 #include "floor/floor-object.h"
@@ -81,7 +82,7 @@ static MONSTER_IDX decide_pet_index(player_type *master_ptr, const int current_m
     for (d = 1; d < A_MAX; d++) {
         int j;
         for (j = 1000; j > 0; j--) {
-            scatter(master_ptr, cy, cx, master_ptr->y, master_ptr->x, d, 0);
+            scatter(master_ptr, cy, cx, master_ptr->y, master_ptr->x, d, PROJECT_NONE);
             if (monster_can_enter(master_ptr, *cy, *cx, &r_info[party_mon[current_monster].r_idx], 0))
                 break;
         }
index 6e7a6a4..e4bd232 100644 (file)
@@ -450,7 +450,7 @@ bool cast_ninja_spell(player_type *caster_ptr, mind_ninja_type spell)
             EFFECT_ID typ = one_in_(2) ? GF_FIRE : one_in_(3) ? GF_NETHER : GF_PLASMA;
             int attempts = 1000;
             while (attempts--) {
-                scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, 0);
+                scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, PROJECT_NONE);
                 if (!player_bold(caster_ptr, y, x))
                     break;
             }
index ca5d7fa..705d006 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "monster-floor/monster-generator.h"
 #include "dungeon/dungeon.h"
+#include "effect/effect-characteristics.h"
 #include "floor/cave.h"
 #include "floor/floor-util.h"
 #include "game-option/cheat-options.h"
@@ -190,7 +191,7 @@ static bool place_monster_group(player_type *player_ptr, MONSTER_IDX who, POSITI
         POSITION hy = hack_y[n];
         for (int i = 0; (i < 8) && (hack_n < total); i++) {
             POSITION mx, my;
-            scatter(player_ptr, &my, &mx, hy, hx, 4, 0);
+            scatter(player_ptr, &my, &mx, hy, hx, 4, PROJECT_NONE);
             if (!is_cave_empty_bold2(player_ptr, my, mx))
                 continue;
 
@@ -271,7 +272,7 @@ bool place_monster_aux(player_type *player_ptr, MONSTER_IDX who, POSITION y, POS
         int n = damroll(r_ptr->reinforce_dd[i], r_ptr->reinforce_ds[i]);
         for (int j = 0; j < n; j++) {
             POSITION nx, ny, d = 7;
-            scatter(player_ptr, &ny, &nx, y, x, d, 0);
+            scatter(player_ptr, &ny, &nx, y, x, d, PROJECT_NONE);
             (void)place_monster_one(player_ptr, place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
         }
     }
@@ -287,7 +288,7 @@ bool place_monster_aux(player_type *player_ptr, MONSTER_IDX who, POSITION y, POS
     for (int i = 0; i < 32; i++) {
         POSITION nx, ny, d = 3;
         MONRACE_IDX z;
-        scatter(player_ptr, &ny, &nx, y, x, d, 0);
+        scatter(player_ptr, &ny, &nx, y, x, d, PROJECT_NONE);
         if (!is_cave_empty_bold2(player_ptr, ny, nx))
             continue;
 
@@ -381,7 +382,7 @@ bool alloc_horde(player_type *player_ptr, POSITION y, POSITION x, summon_specifi
     POSITION cy = y;
     POSITION cx = x;
     for (attempts = randint1(10) + 5; attempts; attempts--) {
-        scatter(player_ptr, &cy, &cx, y, x, 5, 0);
+        scatter(player_ptr, &cy, &cx, y, x, 5, PROJECT_NONE);
         (void)(*summon_specific)(player_ptr, m_idx, cy, cx, floor_ptr->dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP);
         y = cy;
         x = cx;
index 1d3a72d..01f20a8 100644 (file)
@@ -2,7 +2,8 @@
 
 #include "system/angband.h"
 
-typedef bool (*summon_specific_pf)(player_type *, MONSTER_IDX, POSITION, POSITION, DEPTH, int, BIT_FLAGS);
+typedef enum summon_type summon_type;
+typedef bool (*summon_specific_pf)(player_type *, MONSTER_IDX, POSITION, POSITION, DEPTH, summon_type, BIT_FLAGS);
 
 bool mon_scatter(player_type *player_ptr, MONRACE_IDX r_idx, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION max_dist);
 bool multiply_monster(player_type *player_ptr, MONSTER_IDX m_idx, bool clone, BIT_FLAGS mode);
index 4f132c1..df1d85b 100644 (file)
@@ -69,6 +69,19 @@ static bool summon_specific_okay(player_type *player_ptr, MONRACE_IDX r_idx)
 }
 
 /*!
+ * @brief モンスター死亡時に召喚されうるモンスターかどうかの判定
+ * @param type モンスター種族ID
+ * @return 召喚されうるならばTRUE (あやしい影として生成されない)
+ */
+static bool is_dead_summoning(summon_type type)
+{
+    bool summoning = type == SUMMON_BLUE_HORROR;
+    summoning |= type == SUMMON_DAWN;
+    summoning |= type == SUMMON_TOTEM_MOAI;
+    return summoning;
+}
+
+/*!
  * @brief モンスターを召喚により配置する / Place a monster (of the specified "type") near the given location. Return TRUE if a monster was actually summoned.
  * @param player_ptr プレーヤーへの参照ポインタ
  * @param who 召喚主のモンスター情報ID
@@ -79,7 +92,7 @@ static bool summon_specific_okay(player_type *player_ptr, MONRACE_IDX r_idx)
  * @param mode 生成オプション
  * @return 召喚できたらtrueを返す
  */
-bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode)
+bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, summon_type type, BIT_FLAGS mode)
 {
     floor_type *floor_ptr = player_ptr->current_floor_ptr;
     if (floor_ptr->inside_arena)
@@ -100,7 +113,7 @@ bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSI
         return FALSE;
     }
 
-    if ((type == SUMMON_BLUE_HORROR) || (type == SUMMON_DAWN))
+    if (is_dead_summoning(type))
         mode |= PM_NO_KAGE;
 
     if (!place_monster_aux(player_ptr, who, y, x, r_idx, mode)) {
index ed58569..842d22c 100644 (file)
@@ -5,5 +5,6 @@
 extern int summon_specific_who;
 extern bool summon_unique_okay;
 
-bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, int type, BIT_FLAGS mode);
+typedef enum summon_type summon_type;
+bool summon_specific(player_type *player_ptr, MONSTER_IDX who, POSITION y1, POSITION x1, DEPTH lev, summon_type type, BIT_FLAGS mode);
 bool summon_named_creature(player_type *player_ptr, MONSTER_IDX who, POSITION oy, POSITION ox, MONRACE_IDX r_idx, BIT_FLAGS mode);
index e8ec3a6..e3bd8a3 100644 (file)
 #include "view/display-messages.h"
 #include "world/world.h"
 
+/*!
+ * @brief \8e\80\96S\8e\9e\8f¢\8a«\8f\88\97\9d (\8d¡\82Ì\82Æ\82±\82ë\8e©\95ª\8e©\90g\82Ì\82Ý)
+ * @param player_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
+ * @param md_ptr \83\82\83\93\83X\83^\81[\8c\82\94j\8d\\91¢\91Ì\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
+ * @param type \8f¢\8a«\83^\83C\83v
+ * @param probability \8f¢\8a«\8am\97¦ (\8cv\8eZ\8e®\81F1 - 1/probability)
+ * @param radius \8f¢\8a«\94¼\8ca (\83\82\83\93\83X\83^\81[\82ª\8e\80\96S\82µ\82½\8dÀ\95W\82©\82ç\94¼\8ca\89½\83}\83X\88È\93à\82É\8f¢\8a«\82³\82¹\82é\82©)
+ * @param message \8f¢\8a«\8e\9e\82Ì\83\81\83b\83Z\81[\83W
+ * @return \82È\82µ
+ */
+static void summon_self(player_type *player_ptr, monster_death_type *md_ptr, summon_type type, int probability, POSITION radius, concptr message)
+{
+    floor_type *floor_ptr = player_ptr->current_floor_ptr;
+    if (floor_ptr->inside_arena || player_ptr->phase_out || one_in_(probability))
+        return;
+
+    POSITION wy = md_ptr->md_y;
+    POSITION wx = md_ptr->md_x;
+    int attempts = 100;
+    bool pet = is_pet(md_ptr->m_ptr);
+    do {
+        scatter(player_ptr, &wy, &wx, md_ptr->md_y, md_ptr->md_x, radius, PROJECT_NONE);
+    } while (!(in_bounds(floor_ptr, wy, wx) && is_cave_empty_bold2(player_ptr, wy, wx)) && --attempts);
+
+    if (attempts <= 0)
+        return;
+
+    BIT_FLAGS mode = pet ? PM_FORCE_PET : PM_NONE;
+    if (summon_specific(player_ptr, (pet ? -1 : md_ptr->m_idx), wy, wx, 100, type, mode) && player_can_see_bold(player_ptr, wy, wx))
+        msg_print(message);
+}
+
 static void on_dead_pink_horror(player_type *player_ptr, monster_death_type *md_ptr)
 {
     if (player_ptr->current_floor_ptr->inside_arena || player_ptr->phase_out)
         return;
 
     bool notice = FALSE;
-    for (int i = 0; i < 2; i++) {
+    const int blue_horrors = 2;
+    for (int i = 0; i < blue_horrors; i++) {
         POSITION wy = md_ptr->md_y;
         POSITION wx = md_ptr->md_x;
         bool pet = is_pet(md_ptr->m_ptr);
@@ -91,26 +124,15 @@ static void on_dead_raal(player_type *player_ptr, monster_death_type *md_ptr)
     (void)drop_near(player_ptr, q_ptr, -1, md_ptr->md_y, md_ptr->md_x);
 }
 
+/*!
+ * @brief 6/7\82Ì\8am\97¦\82Å\81A20\83}\83X\88È\93à\82É\8bÅ\82Ì\90í\8em\8e©\90g\82ð\8f¢\8a«\82·\82é
+ * @param player_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
+ * @param md_ptr \83\82\83\93\83X\83^\81[\8c\82\94j\8d\\91¢\91Ì\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
+ * @return \82È\82µ
+ */
 static void on_dead_dawn(player_type *player_ptr, monster_death_type *md_ptr)
 {
-    floor_type *floor_ptr = player_ptr->current_floor_ptr;
-    if (floor_ptr->inside_arena || player_ptr->phase_out || one_in_(7))
-        return;
-
-    POSITION wy = md_ptr->md_y;
-    POSITION wx = md_ptr->md_x;
-    int attempts = 100;
-    bool pet = is_pet(md_ptr->m_ptr);
-    do {
-        scatter(player_ptr, &wy, &wx, md_ptr->md_y, md_ptr->md_x, 20, 0);
-    } while (!(in_bounds(floor_ptr, wy, wx) && is_cave_empty_bold2(player_ptr, wy, wx)) && --attempts);
-
-    if (attempts <= 0)
-        return;
-
-    BIT_FLAGS mode = pet ? PM_FORCE_PET : PM_NONE;
-    if (summon_specific(player_ptr, (pet ? -1 : md_ptr->m_idx), wy, wx, 100, SUMMON_DAWN, mode) && player_can_see_bold(player_ptr, wy, wx))
-        msg_print(_("\90V\82½\82È\90í\8em\82ª\8c»\82ê\82½\81I", "A new warrior steps forth!"));
+    summon_self(player_ptr, md_ptr, SUMMON_DAWN, 7, 20, _("\90V\82½\82È\90í\8em\82ª\8c»\82ê\82½\81I", "A new warrior steps forth!"));
 }
 
 static void on_dead_unmaker(player_type *player_ptr, monster_death_type *md_ptr)
@@ -236,26 +258,15 @@ static void on_dead_aqua_illusion(player_type *player_ptr, monster_death_type *m
         msg_print(_("\96A\82ª\92e\82¯\82½\81I", "The bubble pops!"));
 }
 
+/*!
+ * @brief 7/8\82Ì\8am\97¦\82Å\81A5\83}\83X\88È\93à\82É\83g\81[\83e\83\80\83\82\83A\83C\8e©\90g\82ð\8f¢\8a«\82·\82é
+ * @param player_ptr \83v\83\8c\81[\83\84\81[\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
+ * @param md_ptr \83\82\83\93\83X\83^\81[\8c\82\94j\8d\\91¢\91Ì\82Ö\82Ì\8eQ\8fÆ\83|\83C\83\93\83^
+ * @return \82È\82µ
+ */
 static void on_dead_totem_moai(player_type *player_ptr, monster_death_type *md_ptr)
 {
-    floor_type *floor_ptr = player_ptr->current_floor_ptr;
-    if (floor_ptr->inside_arena || player_ptr->phase_out || one_in_(8))
-        return;
-
-    POSITION wy = md_ptr->md_y;
-    POSITION wx = md_ptr->md_x;
-    int attempts = 100;
-    bool pet = is_pet(md_ptr->m_ptr);
-    do {
-        scatter(player_ptr, &wy, &wx, md_ptr->md_y, md_ptr->md_x, 20, 0);
-    } while (!(in_bounds(floor_ptr, wy, wx) && is_cave_empty_bold2(player_ptr, wy, wx)) && --attempts);
-
-    if (attempts <= 0)
-        return;
-
-    BIT_FLAGS mode = pet ? PM_FORCE_PET : PM_NONE;
-    if (summon_named_creature(player_ptr, (pet ? -1 : md_ptr->m_idx), wy, wx, MON_TOTEM_MOAI, mode) && player_can_see_bold(player_ptr, wy, wx))
-        msg_print(_("\90V\82½\82È\83\82\83A\83C\82ª\8c»\82ê\82½\81I", "A new moai steps forth!"));
+    summon_self(player_ptr, md_ptr, SUMMON_TOTEM_MOAI, 8, 5, _("\90V\82½\82È\83\82\83A\83C\82ª\8c»\82ê\82½\81I", "A new moai steps forth!"));
 }
 
 static void on_dead_mimics(player_type *player_ptr, monster_death_type *md_ptr)
index 93e5174..c85b071 100644 (file)
@@ -177,7 +177,7 @@ MONSTER_NUMBER summon_NAZGUL(player_type *target_ptr, POSITION y, POSITION x, MO
         if (!summon_possible(target_ptr, cy, cx) || !is_cave_empty_bold(target_ptr, cy, cx)) {
             int j;
             for (j = 100; j > 0; j--) {
-                scatter(target_ptr, &cy, &cx, y, x, 2, 0);
+                scatter(target_ptr, &cy, &cx, y, x, 2, PROJECT_NONE);
                 if (is_cave_empty_bold(target_ptr, cy, cx))
                     break;
             }
index da6dc8f..8876fc3 100644 (file)
@@ -309,7 +309,7 @@ bool activate_ball_lite(player_type *user_ptr, concptr name)
     for (int k = 0; k < num; k++) {
         int attempts = 1000;
         while (attempts--) {
-            scatter(user_ptr, &y, &x, user_ptr->y, user_ptr->x, 4, 0);
+            scatter(user_ptr, &y, &x, user_ptr->y, user_ptr->x, 4, PROJECT_NONE);
             if (!cave_have_flag_bold(user_ptr->current_floor_ptr, y, x, FF_PROJECT))
                 continue;
 
index a248fe5..12007d2 100644 (file)
@@ -18,6 +18,7 @@
 #include "dungeon/dungeon-flag-types.h"
 #include "dungeon/dungeon.h"
 #include "dungeon/quest.h"
+#include "effect/effect-characteristics.h"
 #include "floor/cave.h"
 #include "floor/floor-events.h"
 #include "floor/floor-leaver.h"
@@ -3783,7 +3784,7 @@ void wreck_the_pattern(player_type *creature_ptr)
     int to_ruin = randint1(45) + 35;
     while (to_ruin--) {
         POSITION r_y, r_x;
-        scatter(creature_ptr, &r_y, &r_x, creature_ptr->y, creature_ptr->x, 4, 0);
+        scatter(creature_ptr, &r_y, &r_x, creature_ptr->y, creature_ptr->x, 4, PROJECT_NONE);
 
         if (pattern_tile(floor_ptr, r_y, r_x) && (f_info[floor_ptr->grid_array[r_y][r_x].feat].subtype != PATTERN_TILE_WRECKED)) {
             cave_set_feat(creature_ptr, r_y, r_x, feat_pattern_corrupted);
index 8a0f0a5..f52d88a 100644 (file)
@@ -642,7 +642,7 @@ concptr do_crusade_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mo
                     POSITION my = 0, mx = 0;
 
                     while (attempt--) {
-                        scatter(caster_ptr, &my, &mx, caster_ptr->y, caster_ptr->x, 4, 0);
+                        scatter(caster_ptr, &my, &mx, caster_ptr->y, caster_ptr->x, 4, PROJECT_NONE);
 
                         /* Require empty grids */
                         if (is_cave_empty_bold2(caster_ptr, my, mx))
index c742b18..834f433 100644 (file)
@@ -129,7 +129,7 @@ void wall_breaker(player_type *caster_ptr)
     int attempts = 1000;
     if (randint1(80 + caster_ptr->lev) < 70) {
         while (attempts--) {
-            scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, 0);
+            scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, PROJECT_NONE);
 
             if (!cave_have_flag_bold(caster_ptr->current_floor_ptr, y, x, FF_PROJECT))
                 continue;
@@ -150,7 +150,7 @@ void wall_breaker(player_type *caster_ptr)
     int num = damroll(5, 3);
     for (int i = 0; i < num; i++) {
         while (TRUE) {
-            scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 10, 0);
+            scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 10, PROJECT_NONE);
 
             if (!player_bold(caster_ptr, y, x))
                 break;
index e850be1..679e6a8 100644 (file)
@@ -27,8 +27,8 @@ typedef enum summon_type {
     SUMMON_ANIMAL = 42, /*!< \8f¢\8a«\83^\83C\83v: \8e©\91R\8aE\82Ì\93®\95¨ */
     SUMMON_ANIMAL_RANGER = 43, /*!< \8f¢\8a«\83^\83C\83v: \83\8c\83\93\83W\83\83\81[\8cü\82¯\8e©\91R\8aE\82Ì\93®\95¨ */
     SUMMON_PHANTOM = 47, /*!< \8f¢\8a«\83^\83C\83v: \83S\81[\83X\83g */
-    SUMMON_BLUE_HORROR = 49, /*!< \8f¢\8a«\83^\83C\83v: \83u\83\8b\81[\81E\83z\83\89\81[ */
     SUMMON_TOTEM_MOAI = 48, /*!< \8f¢\8a«\83^\83C\83v: \83g\81[\83e\83\80\83\82\83A\83C */
+    SUMMON_BLUE_HORROR = 49, /*!< \8f¢\8a«\83^\83C\83v: \83u\83\8b\81[\81E\83z\83\89\81[ */
     SUMMON_LIVING = 50, /*!< \8f¢\8a«\83^\83C\83v: \90\96½\82Ì\82 \82é\83\82\83\93\83X\83^\81[ */
     SUMMON_HI_DRAGON_LIVING = 51, /*!< \8f¢\8a«\83^\83C\83v: \90\96½\82Ì\82 \82é\8cÃ\91ã\83h\83\89\83S\83\93 */
     SUMMON_GOLEM = 52, /*!< \8f¢\8a«\83^\83C\83v: \83S\81[\83\8c\83\80 */
index 8af0ae9..7dfb682 100644 (file)
@@ -7,6 +7,7 @@
 #include "wizard/wizard-spells.h"
 #include "blue-magic/blue-magic-checker.h"
 #include "core/asking-player.h"
+#include "effect/effect-characteristics.h"
 #include "floor/cave.h"
 #include "floor/floor-util.h"
 #include "mind/mind-blue-mage.h"
@@ -91,7 +92,7 @@ void wiz_summon_horde(player_type *caster_ptr)
     int attempts = 1000;
 
     while (--attempts) {
-        scatter(caster_ptr, &wy, &wx, caster_ptr->y, caster_ptr->x, 3, 0);
+        scatter(caster_ptr, &wy, &wx, caster_ptr->y, caster_ptr->x, 3, PROJECT_NONE);
         if (is_cave_empty_bold(caster_ptr, wy, wx))
             break;
     }