OSDN Git Service

[Refactor] #37353 earthquake_aux() と earthquake() を統合.
authordeskull <deskull@users.sourceforge.jp>
Tue, 11 Jun 2019 23:42:36 +0000 (08:42 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 11 Jun 2019 23:42:36 +0000 (08:42 +0900)
12 files changed:
src/cmd-activate.c
src/cmd-usestaff.c
src/melee1.c
src/mind.c
src/monster-process.c
src/mutation.c
src/realm-hissatsu.c
src/realm-nature.c
src/realm-song.c
src/spells.h
src/spells2.c
src/spells3.c

index b040919..e74d42d 100644 (file)
@@ -1094,7 +1094,7 @@ bool activate_artifact(object_type *o_ptr)
 
        case ACT_QUAKE:
        {
-               earthquake(p_ptr->y, p_ptr->x, 5);
+               earthquake(p_ptr->y, p_ptr->x, 5, 0);
                break;
        }
 
index 7216190..90782ba 100644 (file)
@@ -233,7 +233,7 @@ int staff_effect(OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, boo
 
                case SV_STAFF_EARTHQUAKES:
                {
-                       if (earthquake(p_ptr->y, p_ptr->x, (powerful ? 15 : 10)))
+                       if (earthquake(p_ptr->y, p_ptr->x, (powerful ? 15 : 10), 0))
                                ident = TRUE;
                        else
                                msg_print(_("ダンジョンが揺れた。", "The dungeon trembles."));
index 9747a89..23ae064 100644 (file)
@@ -2143,7 +2143,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
        /* Mega-Hack -- apply earthquake brand */
        if (do_quake)
        {
-               earthquake(p_ptr->y, p_ptr->x, 10);
+               earthquake(p_ptr->y, p_ptr->x, 10, 0);
                if (!current_floor_ptr->grid_array[y][x].m_idx) *mdeath = TRUE;
        }
 }
@@ -3372,7 +3372,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
                                        /* Radius 8 earthquake centered at the monster */
                                        if (damage > 23 || explode)
                                        {
-                                               earthquake_aux(m_ptr->fy, m_ptr->fx, 8, m_idx);
+                                               earthquake(m_ptr->fy, m_ptr->fx, 8, m_idx);
                                        }
 
                                        break;
index a2d4d72..0b9cdc9 100644 (file)
@@ -1520,7 +1520,7 @@ static bool cast_berserk_spell(int spell)
                break;
        }
        case 3:
-               earthquake(p_ptr->y, p_ptr->x, 8+randint0(5));
+               earthquake(p_ptr->y, p_ptr->x, 8+randint0(5), 0);
                break;
        case 4:
                massacre();
index 94f8d9b..15b8362 100644 (file)
@@ -1621,7 +1621,7 @@ static bool monst_attack_monst(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
 
                        case RBE_SHATTER:
                                damage -= (damage * ((ac < 150) ? ac : 150) / 250);
-                               if (damage > 23) earthquake_aux(m_ptr->fy, m_ptr->fx, 8, m_idx);
+                               if (damage > 23) earthquake(m_ptr->fy, m_ptr->fx, 8, m_idx);
                                break;
 
                        case RBE_EXP_10:
index 59877e0..5e3f15a 100644 (file)
@@ -2255,7 +2255,7 @@ bool mutation_power_aux(int power)
                        break;
 
                case MUT1_EARTHQUAKE:
-                       (void)earthquake(p_ptr->y, p_ptr->x, 10);
+                       (void)earthquake(p_ptr->y, p_ptr->x, 10, 0);
                        break;
 
                case MUT1_EAT_MAGIC:
index 4b62385..ae157a6 100644 (file)
@@ -572,7 +572,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        if (current_floor_ptr->grid_array[y][x].m_idx)
                                py_attack(y, x, HISSATSU_QUAKE);
                        else
-                               earthquake(p_ptr->y, p_ptr->x, 10);
+                               earthquake(p_ptr->y, p_ptr->x, 10, 0);
                }
                break;
 
index d25979c..fd75a89 100644 (file)
@@ -441,7 +441,7 @@ concptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               earthquake(p_ptr->y, p_ptr->x, rad);
+                               earthquake(p_ptr->y, p_ptr->x, rad, 0);
                        }
                }
                break;
@@ -563,7 +563,7 @@ concptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        if (cast)
                        {
                                dispel_monsters(d_dam);
-                               earthquake(p_ptr->y, p_ptr->x, q_rad);
+                               earthquake(p_ptr->y, p_ptr->x, q_rad, 0);
                                project(0, b_rad, p_ptr->y, p_ptr->x, b_dam, GF_DISINTEGRATE, PROJECT_KILL | PROJECT_ITEM, -1);
                        }
                }
index 9e96335..3366502 100644 (file)
@@ -728,7 +728,7 @@ concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cont)
                        {
-                               earthquake(p_ptr->y, p_ptr->x, 10);
+                               earthquake(p_ptr->y, p_ptr->x, 10, 0);
                        }
                }
 
index 4f8118f..98071a4 100644 (file)
@@ -193,8 +193,7 @@ extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
 extern bool crusade(void);
 extern bool turn_undead(void);
 extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
-extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
-extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
+extern bool earthquake(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
 extern void lite_room(POSITION y1, POSITION x1);
 extern bool starlight(bool magic);
 extern void unlite_room(POSITION y1, POSITION x1);
index b29afb8..da47cef 100644 (file)
@@ -1656,7 +1656,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
  * This has allowed massive simplification of the "monster" code.
  * </pre>
  */
-bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
+bool earthquake(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
 {
        DIRECTION i;
        int t;
@@ -2073,19 +2073,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
 }
 
 /*!
- * @brief 地震処理(プレイヤーの中心発動) /
- * Induce an "earthquake" of the given radius at the given location.
- * @return 効力があった場合TRUEを返す
- * @param cy 中心Y座標
- * @param cx 中心X座標
- * @param r 効果半径
- */
-bool earthquake(POSITION cy, POSITION cx, POSITION r)
-{
-       return earthquake_aux(cy, cx, r, 0);
-}
-
-/*!
  * @brief ペット爆破処理 /
  * @return なし
  */
@@ -3281,7 +3268,7 @@ bool activate_ty_curse(bool stop_ty, int *count)
                        if (!(*count))
                        {
                                msg_print(_("地面が揺れた...", "The ground trembles..."));
-                               earthquake(p_ptr->y, p_ptr->x, 5 + randint0(10));
+                               earthquake(p_ptr->y, p_ptr->x, 5 + randint0(10), 0);
                                if (!one_in_(6)) break;
                        }
                case 30: case 31:
@@ -3488,7 +3475,7 @@ void wall_breaker(void)
        }
        else if (randint1(100) > 30)
        {
-               earthquake(p_ptr->y, p_ptr->x, 1);
+               earthquake(p_ptr->y, p_ptr->x, 1, 0);
        }
        else
        {
@@ -3969,7 +3956,7 @@ void wild_magic(int spell)
                aggravate_monsters(0);
                break;
        case 26:
-               earthquake(p_ptr->y, p_ptr->x, 5);
+               earthquake(p_ptr->y, p_ptr->x, 5, 0);
                break;
        case 27:
        case 28:
@@ -4215,7 +4202,7 @@ void cast_wonder(DIRECTION dir)
        else if (die < 101) hypodynamic_bolt(dir, 100 + plev);
        else if (die < 104)
        {
-               earthquake(p_ptr->y, p_ptr->x, 12);
+               earthquake(p_ptr->y, p_ptr->x, 12, 0);
        }
        else if (die < 106)
        {
@@ -4356,7 +4343,7 @@ void cast_invoke_spirits(DIRECTION dir)
        }
        else if (die < 104)
        {
-               earthquake(p_ptr->y, p_ptr->x, 12);
+               earthquake(p_ptr->y, p_ptr->x, 12, 0);
        }
        else if (die < 106)
        {
@@ -4501,7 +4488,7 @@ void cast_shuffle(void)
        {
                msg_print(_("《塔》だ。", "It's the Tower."));
 
-               earthquake(p_ptr->y, p_ptr->x, 5);
+               earthquake(p_ptr->y, p_ptr->x, 5, 0);
        }
        else if (die < 82)
        {
index 92b3157..9b8b74b 100644 (file)
@@ -3920,7 +3920,7 @@ void blood_curse_to_enemy(MONSTER_IDX m_idx)
                        if (!count)
                        {
                                msg_print(_("地面が揺れた...", "The ground trembles..."));
-                               earthquake(m_ptr->fy, m_ptr->fx, 4 + randint0(4));
+                               earthquake(m_ptr->fy, m_ptr->fx, 4 + randint0(4), 0);
                                if (!one_in_(6)) break;
                        }
                case 3: case 4: case 5: case 6: