• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisionbe2b16e95fe8cfbc98f22168e125224c470d4dbe (tree)
Time2019-06-12 08:42:36
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #37353 earthquake_aux() と earthquake() を統合.

Change Summary

Incremental Difference

--- a/src/cmd-activate.c
+++ b/src/cmd-activate.c
@@ -1094,7 +1094,7 @@ bool activate_artifact(object_type *o_ptr)
10941094
10951095 case ACT_QUAKE:
10961096 {
1097- earthquake(p_ptr->y, p_ptr->x, 5);
1097+ earthquake(p_ptr->y, p_ptr->x, 5, 0);
10981098 break;
10991099 }
11001100
--- a/src/cmd-usestaff.c
+++ b/src/cmd-usestaff.c
@@ -233,7 +233,7 @@ int staff_effect(OBJECT_SUBTYPE_VALUE sval, bool *use_charge, bool powerful, boo
233233
234234 case SV_STAFF_EARTHQUAKES:
235235 {
236- if (earthquake(p_ptr->y, p_ptr->x, (powerful ? 15 : 10)))
236+ if (earthquake(p_ptr->y, p_ptr->x, (powerful ? 15 : 10), 0))
237237 ident = TRUE;
238238 else
239239 msg_print(_("ダンジョンが揺れた。", "The dungeon trembles."));
--- a/src/melee1.c
+++ b/src/melee1.c
@@ -2143,7 +2143,7 @@ static void py_attack_aux(POSITION y, POSITION x, bool *fear, bool *mdeath, s16b
21432143 /* Mega-Hack -- apply earthquake brand */
21442144 if (do_quake)
21452145 {
2146- earthquake(p_ptr->y, p_ptr->x, 10);
2146+ earthquake(p_ptr->y, p_ptr->x, 10, 0);
21472147 if (!current_floor_ptr->grid_array[y][x].m_idx) *mdeath = TRUE;
21482148 }
21492149 }
@@ -3372,7 +3372,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
33723372 /* Radius 8 earthquake centered at the monster */
33733373 if (damage > 23 || explode)
33743374 {
3375- earthquake_aux(m_ptr->fy, m_ptr->fx, 8, m_idx);
3375+ earthquake(m_ptr->fy, m_ptr->fx, 8, m_idx);
33763376 }
33773377
33783378 break;
--- a/src/mind.c
+++ b/src/mind.c
@@ -1520,7 +1520,7 @@ static bool cast_berserk_spell(int spell)
15201520 break;
15211521 }
15221522 case 3:
1523- earthquake(p_ptr->y, p_ptr->x, 8+randint0(5));
1523+ earthquake(p_ptr->y, p_ptr->x, 8+randint0(5), 0);
15241524 break;
15251525 case 4:
15261526 massacre();
--- a/src/monster-process.c
+++ b/src/monster-process.c
@@ -1621,7 +1621,7 @@ static bool monst_attack_monst(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
16211621
16221622 case RBE_SHATTER:
16231623 damage -= (damage * ((ac < 150) ? ac : 150) / 250);
1624- if (damage > 23) earthquake_aux(m_ptr->fy, m_ptr->fx, 8, m_idx);
1624+ if (damage > 23) earthquake(m_ptr->fy, m_ptr->fx, 8, m_idx);
16251625 break;
16261626
16271627 case RBE_EXP_10:
--- a/src/mutation.c
+++ b/src/mutation.c
@@ -2255,7 +2255,7 @@ bool mutation_power_aux(int power)
22552255 break;
22562256
22572257 case MUT1_EARTHQUAKE:
2258- (void)earthquake(p_ptr->y, p_ptr->x, 10);
2258+ (void)earthquake(p_ptr->y, p_ptr->x, 10, 0);
22592259 break;
22602260
22612261 case MUT1_EAT_MAGIC:
--- a/src/realm-hissatsu.c
+++ b/src/realm-hissatsu.c
@@ -572,7 +572,7 @@ concptr do_hissatsu_spell(SPELL_IDX spell, BIT_FLAGS mode)
572572 if (current_floor_ptr->grid_array[y][x].m_idx)
573573 py_attack(y, x, HISSATSU_QUAKE);
574574 else
575- earthquake(p_ptr->y, p_ptr->x, 10);
575+ earthquake(p_ptr->y, p_ptr->x, 10, 0);
576576 }
577577 break;
578578
--- a/src/realm-nature.c
+++ b/src/realm-nature.c
@@ -441,7 +441,7 @@ concptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
441441
442442 if (cast)
443443 {
444- earthquake(p_ptr->y, p_ptr->x, rad);
444+ earthquake(p_ptr->y, p_ptr->x, rad, 0);
445445 }
446446 }
447447 break;
@@ -563,7 +563,7 @@ concptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
563563 if (cast)
564564 {
565565 dispel_monsters(d_dam);
566- earthquake(p_ptr->y, p_ptr->x, q_rad);
566+ earthquake(p_ptr->y, p_ptr->x, q_rad, 0);
567567 project(0, b_rad, p_ptr->y, p_ptr->x, b_dam, GF_DISINTEGRATE, PROJECT_KILL | PROJECT_ITEM, -1);
568568 }
569569 }
--- a/src/realm-song.c
+++ b/src/realm-song.c
@@ -728,7 +728,7 @@ concptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
728728
729729 if (cont)
730730 {
731- earthquake(p_ptr->y, p_ptr->x, 10);
731+ earthquake(p_ptr->y, p_ptr->x, 10, 0);
732732 }
733733 }
734734
--- a/src/spells.h
+++ b/src/spells.h
@@ -193,8 +193,7 @@ extern bool unleash_mana_storm(player_type *creature_ptr, bool powerful);
193193 extern bool crusade(void);
194194 extern bool turn_undead(void);
195195 extern bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate);
196-extern bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
197-extern bool earthquake(POSITION cy, POSITION cx, POSITION r);
196+extern bool earthquake(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx);
198197 extern void lite_room(POSITION y1, POSITION x1);
199198 extern bool starlight(bool magic);
200199 extern void unlite_room(POSITION y1, POSITION x1);
--- a/src/spells2.c
+++ b/src/spells2.c
@@ -1656,7 +1656,7 @@ bool destroy_area(POSITION y1, POSITION x1, POSITION r, bool in_generate)
16561656 * This has allowed massive simplification of the "monster" code.
16571657 * </pre>
16581658 */
1659-bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
1659+bool earthquake(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
16601660 {
16611661 DIRECTION i;
16621662 int t;
@@ -2073,19 +2073,6 @@ bool earthquake_aux(POSITION cy, POSITION cx, POSITION r, MONSTER_IDX m_idx)
20732073 }
20742074
20752075 /*!
2076- * @brief 地震処理(プレイヤーの中心発動) /
2077- * Induce an "earthquake" of the given radius at the given location.
2078- * @return 効力があった場合TRUEを返す
2079- * @param cy 中心Y座標
2080- * @param cx 中心X座標
2081- * @param r 効果半径
2082- */
2083-bool earthquake(POSITION cy, POSITION cx, POSITION r)
2084-{
2085- return earthquake_aux(cy, cx, r, 0);
2086-}
2087-
2088-/*!
20892076 * @brief ペット爆破処理 /
20902077 * @return なし
20912078 */
@@ -3281,7 +3268,7 @@ bool activate_ty_curse(bool stop_ty, int *count)
32813268 if (!(*count))
32823269 {
32833270 msg_print(_("地面が揺れた...", "The ground trembles..."));
3284- earthquake(p_ptr->y, p_ptr->x, 5 + randint0(10));
3271+ earthquake(p_ptr->y, p_ptr->x, 5 + randint0(10), 0);
32853272 if (!one_in_(6)) break;
32863273 }
32873274 case 30: case 31:
@@ -3488,7 +3475,7 @@ void wall_breaker(void)
34883475 }
34893476 else if (randint1(100) > 30)
34903477 {
3491- earthquake(p_ptr->y, p_ptr->x, 1);
3478+ earthquake(p_ptr->y, p_ptr->x, 1, 0);
34923479 }
34933480 else
34943481 {
@@ -3969,7 +3956,7 @@ void wild_magic(int spell)
39693956 aggravate_monsters(0);
39703957 break;
39713958 case 26:
3972- earthquake(p_ptr->y, p_ptr->x, 5);
3959+ earthquake(p_ptr->y, p_ptr->x, 5, 0);
39733960 break;
39743961 case 27:
39753962 case 28:
@@ -4215,7 +4202,7 @@ void cast_wonder(DIRECTION dir)
42154202 else if (die < 101) hypodynamic_bolt(dir, 100 + plev);
42164203 else if (die < 104)
42174204 {
4218- earthquake(p_ptr->y, p_ptr->x, 12);
4205+ earthquake(p_ptr->y, p_ptr->x, 12, 0);
42194206 }
42204207 else if (die < 106)
42214208 {
@@ -4356,7 +4343,7 @@ void cast_invoke_spirits(DIRECTION dir)
43564343 }
43574344 else if (die < 104)
43584345 {
4359- earthquake(p_ptr->y, p_ptr->x, 12);
4346+ earthquake(p_ptr->y, p_ptr->x, 12, 0);
43604347 }
43614348 else if (die < 106)
43624349 {
@@ -4501,7 +4488,7 @@ void cast_shuffle(void)
45014488 {
45024489 msg_print(_("《塔》だ。", "It's the Tower."));
45034490
4504- earthquake(p_ptr->y, p_ptr->x, 5);
4491+ earthquake(p_ptr->y, p_ptr->x, 5, 0);
45054492 }
45064493 else if (die < 82)
45074494 {
--- a/src/spells3.c
+++ b/src/spells3.c
@@ -3920,7 +3920,7 @@ void blood_curse_to_enemy(MONSTER_IDX m_idx)
39203920 if (!count)
39213921 {
39223922 msg_print(_("地面が揺れた...", "The ground trembles..."));
3923- earthquake(m_ptr->fy, m_ptr->fx, 4 + randint0(4));
3923+ earthquake(m_ptr->fy, m_ptr->fx, 4 + randint0(4), 0);
39243924 if (!one_in_(6)) break;
39253925 }
39263926 case 3: case 4: case 5: case 6:
Show on old repository browser