From bca3eeb0070355714b3c7bc386b9f5e1bcc86641 Mon Sep 17 00:00:00 2001 From: Hourier Date: Wed, 1 Jul 2020 22:16:40 +0900 Subject: [PATCH] [Refactor] #40466 Changed kabe to wall --- src/core/hp-mp-processor.c | 2 +- src/core/magic-effects-timeout-reducer.c | 4 ++-- src/core/status-reseter.c | 2 +- src/io/chuukei.c | 8 ++++---- src/io/load.c | 4 ++-- src/io/save.c | 2 +- src/mind/mind.c | 2 +- src/mspell/mspell-dispel.c | 2 +- src/player/player-status.c | 12 ++++++------ src/player/player-status.h | 4 ++-- src/realm/realm-craft.c | 2 +- src/status/body-improvement.c | 14 +++++++------- src/status/body-improvement.h | 2 +- src/view/main-window-stat-poster.c | 2 +- 14 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/core/hp-mp-processor.c b/src/core/hp-mp-processor.c index 6fea07b85..8478de697 100644 --- a/src/core/hp-mp-processor.c +++ b/src/core/hp-mp-processor.c @@ -317,7 +317,7 @@ void process_player_hp_mp(player_type *creature_ptr) * WILL BE! */ if (!have_flag(f_ptr->flags, FF_MOVE) && !have_flag(f_ptr->flags, FF_CAN_FLY)) { - if (!is_invuln(creature_ptr) && !creature_ptr->wraith_form && !creature_ptr->kabenuke + if (!is_invuln(creature_ptr) && !creature_ptr->wraith_form && !creature_ptr->tim_pass_wall && ((creature_ptr->chp > (creature_ptr->lev / 5)) || !creature_ptr->pass_wall)) { concptr dam_desc; cave_no_regen = TRUE; diff --git a/src/core/magic-effects-timeout-reducer.c b/src/core/magic-effects-timeout-reducer.c index c2bb1af91..47a4cba73 100644 --- a/src/core/magic-effects-timeout-reducer.c +++ b/src/core/magic-effects-timeout-reducer.c @@ -116,8 +116,8 @@ void reduce_magic_effects_timeout(player_type *creature_ptr) (void)set_dustrobe(creature_ptr, creature_ptr->dustrobe - 1, TRUE); } - if (creature_ptr->kabenuke) { - (void)set_kabenuke(creature_ptr, creature_ptr->kabenuke - 1, TRUE); + if (creature_ptr->tim_pass_wall) { + (void)set_pass_wall(creature_ptr, creature_ptr->tim_pass_wall - 1, TRUE); } if (creature_ptr->paralyzed) { diff --git a/src/core/status-reseter.c b/src/core/status-reseter.c index 3576bbc35..10c6aed0b 100644 --- a/src/core/status-reseter.c +++ b/src/core/status-reseter.c @@ -42,7 +42,7 @@ void reset_tim_flags(player_type *creature_ptr) creature_ptr->magicdef = 0; creature_ptr->resist_magic = 0; creature_ptr->tsuyoshi = 0; - creature_ptr->kabenuke = 0; + creature_ptr->tim_pass_wall = 0; creature_ptr->tim_res_nether = 0; creature_ptr->tim_res_time = 0; creature_ptr->tim_mimic = 0; diff --git a/src/io/chuukei.c b/src/io/chuukei.c index f65015c4f..e0b16696c 100644 --- a/src/io/chuukei.c +++ b/src/io/chuukei.c @@ -695,11 +695,11 @@ static int read_movie_file(void) /* Win版の床の中点と壁の豆腐をピリオドとシャープにする。*/ static void win2unix(int col, char *buf) { - char kabe; + char wall; if (col == 9) - kabe = '%'; + wall = '%'; else - kabe = '#'; + wall = '#'; while (*buf) { #ifdef JP @@ -709,7 +709,7 @@ static void win2unix(int col, char *buf) } #endif if (*buf == 127) - *buf = kabe; + *buf = wall; else if (*buf == 31) *buf = '.'; buf++; diff --git a/src/io/load.c b/src/io/load.c index 44cc73c8b..adf901698 100644 --- a/src/io/load.c +++ b/src/io/load.c @@ -1989,7 +1989,7 @@ static void rd_extra(player_type *creature_ptr) creature_ptr->wraith_form = 0; creature_ptr->resist_magic = 0; creature_ptr->tim_regen = 0; - creature_ptr->kabenuke = 0; + creature_ptr->tim_pass_wall = 0; creature_ptr->tim_stealth = 0; creature_ptr->tim_levitation = 0; creature_ptr->tim_sh_touki = 0; @@ -2013,7 +2013,7 @@ static void rd_extra(player_type *creature_ptr) rd_s16b(&creature_ptr->wraith_form); rd_s16b(&creature_ptr->resist_magic); rd_s16b(&creature_ptr->tim_regen); - rd_s16b(&creature_ptr->kabenuke); + rd_s16b(&creature_ptr->tim_pass_wall); rd_s16b(&creature_ptr->tim_stealth); rd_s16b(&creature_ptr->tim_levitation); rd_s16b(&creature_ptr->tim_sh_touki); diff --git a/src/io/save.c b/src/io/save.c index f637705f5..95082e218 100644 --- a/src/io/save.c +++ b/src/io/save.c @@ -752,7 +752,7 @@ static void wr_extra(player_type *creature_ptr) wr_s16b(creature_ptr->wraith_form); wr_s16b(creature_ptr->resist_magic); wr_s16b(creature_ptr->tim_regen); - wr_s16b(creature_ptr->kabenuke); + wr_s16b(creature_ptr->tim_pass_wall); wr_s16b(creature_ptr->tim_stealth); wr_s16b(creature_ptr->tim_levitation); wr_s16b(creature_ptr->tim_sh_touki); diff --git a/src/mind/mind.c b/src/mind/mind.c index eb8c83f9e..f9c974347 100644 --- a/src/mind/mind.c +++ b/src/mind/mind.c @@ -1690,7 +1690,7 @@ static bool cast_ninja_spell(player_type *caster_ptr, int spell) explosive_rune(caster_ptr, caster_ptr->y, caster_ptr->x); break; case 16: - (void)set_kabenuke(caster_ptr, randint1(plev/2) + plev/2, FALSE); + (void)set_pass_wall(caster_ptr, randint1(plev/2) + plev/2, FALSE); set_oppose_acid(caster_ptr, (TIME_EFFECT)plev, FALSE); break; case 17: diff --git a/src/mspell/mspell-dispel.c b/src/mspell/mspell-dispel.c index 8285cdb5d..4770cb02e 100644 --- a/src/mspell/mspell-dispel.c +++ b/src/mspell/mspell-dispel.c @@ -41,7 +41,7 @@ static void dispel_player(player_type *creature_ptr) (void)set_protevil(creature_ptr, 0, TRUE); (void)set_invuln(creature_ptr, 0, TRUE); (void)set_wraith_form(creature_ptr, 0, TRUE); - (void)set_kabenuke(creature_ptr, 0, TRUE); + (void)set_pass_wall(creature_ptr, 0, TRUE); (void)set_tim_res_nether(creature_ptr, 0, TRUE); (void)set_tim_res_time(creature_ptr, 0, TRUE); (void)set_tim_reflect(creature_ptr, 0, TRUE); diff --git a/src/player/player-status.c b/src/player/player-status.c index e7bb6401f..e5ec4c1a0 100644 --- a/src/player/player-status.c +++ b/src/player/player-status.c @@ -1370,7 +1370,7 @@ void calc_bonuses(player_type *creature_ptr) bool yoiyami = FALSE; bool down_saving = FALSE; - bool have_sw = FALSE, have_kabe = FALSE; + bool have_sw = FALSE, have_wall = FALSE; bool easy_2weapon = FALSE; bool riding_levitation = FALSE; OBJECT_IDX this_o_idx, next_o_idx = 0; @@ -2226,7 +2226,7 @@ void calc_bonuses(player_type *creature_ptr) creature_ptr->pass_wall = TRUE; } - if (creature_ptr->kabenuke) + if (creature_ptr->tim_pass_wall) { creature_ptr->pass_wall = TRUE; } @@ -3135,7 +3135,7 @@ void calc_bonuses(player_type *creature_ptr) for (int i = 0; i < INVEN_PACK; i++) { if ((creature_ptr->inventory_list[i].tval == TV_NATURE_BOOK) && (creature_ptr->inventory_list[i].sval == 2)) have_sw = TRUE; - if ((creature_ptr->inventory_list[i].tval == TV_CRAFT_BOOK) && (creature_ptr->inventory_list[i].sval == 2)) have_kabe = TRUE; + if ((creature_ptr->inventory_list[i].tval == TV_CRAFT_BOOK) && (creature_ptr->inventory_list[i].sval == 2)) have_wall = TRUE; } for (this_o_idx = floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx) @@ -3144,7 +3144,7 @@ void calc_bonuses(player_type *creature_ptr) next_o_idx = o_ptr->next_o_idx; if ((o_ptr->tval == TV_NATURE_BOOK) && (o_ptr->sval == 2)) have_sw = TRUE; - if ((o_ptr->tval == TV_CRAFT_BOOK) && (o_ptr->sval == 2)) have_kabe = TRUE; + if ((o_ptr->tval == TV_CRAFT_BOOK) && (o_ptr->sval == 2)) have_wall = TRUE; } if (creature_ptr->pass_wall && !creature_ptr->kill_wall) creature_ptr->no_flowed = TRUE; @@ -3155,9 +3155,9 @@ void calc_bonuses(player_type *creature_ptr) if (creature_ptr->lev >= s_ptr->slevel) creature_ptr->no_flowed = TRUE; } - if (have_kabe && ((creature_ptr->realm1 == REALM_CRAFT) || (creature_ptr->realm2 == REALM_CRAFT) || (creature_ptr->pclass == CLASS_SORCERER))) + if (have_wall && ((creature_ptr->realm1 == REALM_CRAFT) || (creature_ptr->realm2 == REALM_CRAFT) || (creature_ptr->pclass == CLASS_SORCERER))) { - const magic_type *s_ptr = &mp_ptr->info[REALM_CRAFT - 1][SPELL_KABE]; + const magic_type *s_ptr = &mp_ptr->info[REALM_CRAFT - 1][SPELL_WALL]; if (creature_ptr->lev >= s_ptr->slevel) creature_ptr->no_flowed = TRUE; } } diff --git a/src/player/player-status.h b/src/player/player-status.h index 2b16abf93..ac8c7ecce 100644 --- a/src/player/player-status.h +++ b/src/player/player-status.h @@ -38,7 +38,7 @@ #define SPELL_DD_S 27 #define SPELL_DD_T 13 #define SPELL_SW 22 -#define SPELL_KABE 20 +#define SPELL_WALL 20 /* Empty hand status */ #define EMPTY_HAND_NONE 0x0000 /* Both hands are used */ @@ -188,7 +188,7 @@ typedef struct player_type TIME_EFFECT resist_magic; /* Timed Resist Magic (later) */ TIME_EFFECT tim_regen; - TIME_EFFECT kabenuke; + TIME_EFFECT tim_pass_wall; TIME_EFFECT tim_stealth; TIME_EFFECT tim_levitation; TIME_EFFECT tim_sh_touki; diff --git a/src/realm/realm-craft.c b/src/realm/realm-craft.c index 733ba256f..2a244b223 100644 --- a/src/realm/realm-craft.c +++ b/src/realm/realm-craft.c @@ -364,7 +364,7 @@ concptr do_craft_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode if (cast) { - set_kabenuke(caster_ptr, randint1(base) + base, FALSE); + set_pass_wall(caster_ptr, randint1(base) + base, FALSE); } } break; diff --git a/src/status/body-improvement.c b/src/status/body-improvement.c index 09b8f4b43..542747260 100644 --- a/src/status/body-improvement.c +++ b/src/status/body-improvement.c @@ -196,12 +196,12 @@ bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec) } /*! - * @brief 一時的壁抜けの継続時間をセットする / Set "kabenuke", notice observable changes + * @brief 一時的壁抜けの継続時間をセットする / Set "tim_pass_wall", notice observable changes * @param v 継続時間 * @param do_dec 現在の継続時間より長い値のみ上書きする * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。 */ -bool set_kabenuke(player_type *creature_ptr, TIME_EFFECT v, bool do_dec) +bool set_pass_wall(player_type *creature_ptr, TIME_EFFECT v, bool do_dec) { bool notice = FALSE; v = (v > 10000) ? 10000 : (v < 0) ? 0 : v; @@ -210,21 +210,21 @@ bool set_kabenuke(player_type *creature_ptr, TIME_EFFECT v, bool do_dec) return FALSE; if (v) { - if (creature_ptr->kabenuke && !do_dec) { - if (creature_ptr->kabenuke > v) + if (creature_ptr->tim_pass_wall && !do_dec) { + if (creature_ptr->tim_pass_wall > v) return FALSE; - } else if (!creature_ptr->kabenuke) { + } else if (!creature_ptr->tim_pass_wall) { msg_print(_("体が半物質の状態になった。", "You became ethereal.")); notice = TRUE; } } else { - if (creature_ptr->kabenuke) { + if (creature_ptr->tim_pass_wall) { msg_print(_("体が物質化した。", "You are no longer ethereal.")); notice = TRUE; } } - creature_ptr->kabenuke = v; + creature_ptr->tim_pass_wall = v; creature_ptr->redraw |= (PR_STATUS); if (!notice) diff --git a/src/status/body-improvement.h b/src/status/body-improvement.h index 2de2c66b8..24671be28 100644 --- a/src/status/body-improvement.h +++ b/src/status/body-improvement.h @@ -6,4 +6,4 @@ bool set_protevil(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); bool set_invuln(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); bool set_tim_regen(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); -bool set_kabenuke(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); +bool set_pass_wall(player_type *creature_ptr, TIME_EFFECT v, bool do_dec); diff --git a/src/view/main-window-stat-poster.c b/src/view/main-window-stat-poster.c index ff55668c1..2a6952325 100644 --- a/src/view/main-window-stat-poster.c +++ b/src/view/main-window-stat-poster.c @@ -430,7 +430,7 @@ void print_status(player_type *creature_ptr) if (creature_ptr->wraith_form) ADD_BAR_FLAG(BAR_WRAITH); - if (creature_ptr->kabenuke) + if (creature_ptr->tim_pass_wall) ADD_BAR_FLAG(BAR_PASSWALL); if (creature_ptr->tim_reflect) -- 2.11.0