From 1f9ca8dd7f64432cafca2ca7e38b5f4376502613 Mon Sep 17 00:00:00 2001 From: Deskull Date: Sat, 6 Oct 2018 18:14:07 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37287=20#37353=20=E5=9E=8B?= =?utf8?q?=E3=81=AE=E7=BD=AE=E6=8F=9B=E3=80=82=20/=20Type=20replacement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/chest.c | 6 +++--- src/chest.h | 4 ++-- src/externs.h | 2 +- src/mutation.c | 22 +++++++--------------- src/racial.c | 8 ++++---- 5 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/chest.c b/src/chest.c index c81f8b5ee..721d0844a 100644 --- a/src/chest.c +++ b/src/chest.c @@ -20,7 +20,7 @@ * on the level on which the chest is generated. * */ -void chest_death(bool scatter, int y, int x, s16b o_idx) +void chest_death(bool scatter, POSITION y, POSITION x, OBJECT_IDX o_idx) { int number; @@ -132,9 +132,9 @@ void chest_death(bool scatter, int y, int x, s16b o_idx) * Note that the chest itself is never destroyed. * */ -void chest_trap(POSITION y, POSITION x, KIND_OBJECT_IDX o_idx) +void chest_trap(POSITION y, POSITION x, OBJECT_IDX o_idx) { - int i, trap; + int i, trap; object_type *o_ptr = &o_list[o_idx]; diff --git a/src/chest.h b/src/chest.h index 9af1095b5..52a9a874a 100644 --- a/src/chest.h +++ b/src/chest.h @@ -1,4 +1,4 @@ -extern void chest_death(bool scatter, int y, int x, s16b o_idx); -extern void chest_trap(POSITION y, POSITION x, KIND_OBJECT_IDX o_idx); +extern void chest_death(bool scatter, POSITION y, POSITION x, OBJECT_IDX o_idx); +extern void chest_trap(POSITION y, POSITION x, OBJECT_IDX o_idx); diff --git a/src/externs.h b/src/externs.h index 89153d506..87f883a1e 100644 --- a/src/externs.h +++ b/src/externs.h @@ -1572,7 +1572,7 @@ extern void lose_all_mutations(void); extern void dump_mutations(FILE *OutFile); extern void do_cmd_knowledge_mutations(void); extern int calc_mutant_regenerate_mod(void); -extern bool mutation_power_aux(u32b power); +extern bool mutation_power_aux(int power); /* diff --git a/src/mutation.c b/src/mutation.c index a85aaec92..f47cae718 100644 --- a/src/mutation.c +++ b/src/mutation.c @@ -2086,14 +2086,13 @@ int calc_mutant_regenerate_mod(void) /*! * @brief 突然変異のレイシャル効果実装 - * @return 発動させる突然変異レイシャルのID + * @param power 発動させる突然変異レイシャルのID * @return レイシャルを実行した場合TRUE、キャンセルした場合FALSEを返す */ -bool mutation_power_aux(u32b power) +bool mutation_power_aux(int power) { - int dir = 0; - int lvl = p_ptr->lev; - + DIRECTION dir = 0; + PLAYER_LEVEL lvl = p_ptr->lev; switch (power) { @@ -2101,7 +2100,6 @@ bool mutation_power_aux(u32b power) if (!get_aim_dir(&dir)) return FALSE; stop_mouth(); msg_print(_("酸を吐きかけた...", "You spit acid...")); - fire_ball(GF_ACID, dir, lvl, 1 + (lvl / 30)); break; @@ -2109,40 +2107,34 @@ bool mutation_power_aux(u32b power) if (!get_aim_dir(&dir)) return FALSE; stop_mouth(); msg_print(_("あなたは火炎のブレスを吐いた...", "You breathe fire...")); - fire_breath(GF_FIRE, dir, lvl * 2, 1 + (lvl / 20)); break; case MUT1_HYPN_GAZE: if (!get_aim_dir(&dir)) return FALSE; msg_print(_("あなたの目は幻惑的になった...", "Your eyes look mesmerizing...")); - (void)charm_monster(dir, lvl); break; case MUT1_TELEKINES: if (!get_aim_dir(&dir)) return FALSE; msg_print(_("集中している...", "You concentrate...")); - fetch(dir, lvl * 10, TRUE); break; case MUT1_VTELEPORT: msg_print(_("集中している...", "You concentrate...")); - teleport_player(10 + 4 * lvl, 0L); break; case MUT1_MIND_BLST: if (!get_aim_dir(&dir)) return FALSE; msg_print(_("集中している...", "You concentrate...")); - fire_bolt(GF_PSI, dir, damroll(3 + ((lvl - 1) / 5), 3)); break; case MUT1_RADIATION: msg_print(_("体から放射能が発生した!", "Radiation flows from your body!")); - fire_ball(GF_NUKE, 0, (lvl * 2), 3 + (lvl / 20)); break; @@ -2166,7 +2158,7 @@ bool mutation_power_aux(u32b power) case MUT1_EAT_ROCK: { - int x, y; + POSITION x, y; cave_type *c_ptr; feature_type *f_ptr, *mimic_f_ptr; @@ -2362,7 +2354,7 @@ bool mutation_power_aux(u32b power) case MUT1_BANISH: { - int x, y; + POSITION x, y; cave_type *c_ptr; monster_type *m_ptr; monster_race *r_ptr; @@ -2412,7 +2404,7 @@ bool mutation_power_aux(u32b power) case MUT1_COLD_TOUCH: { - int x, y; + POSITION x, y; cave_type *c_ptr; if (!get_rep_dir2(&dir)) return FALSE; diff --git a/src/racial.c b/src/racial.c index c20974376..2599e4910 100644 --- a/src/racial.c +++ b/src/racial.c @@ -595,10 +595,10 @@ struct power_desc_type { char name[80]; PLAYER_LEVEL level; - int cost; - int stat; - int fail; - int number; + int cost; + int stat; + int fail; + int number; }; -- 2.11.0