From: deskull Date: Mon, 11 Jan 2021 06:02:48 +0000 (+0900) Subject: [Refactor] #40514 player_type の kill_wall 変数を廃止. / Abolished kill_wall variable in... X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=2324bf9b0cbb8cf4304ca839cbbd04ad2a915410 [Refactor] #40514 player_type の kill_wall 変数を廃止. / Abolished kill_wall variable in player_type. --- diff --git a/src/action/movement-execution.c b/src/action/movement-execution.c index a71647bc4..69efe703d 100644 --- a/src/action/movement-execution.c +++ b/src/action/movement-execution.c @@ -25,6 +25,7 @@ #include "mutation/mutation-flag-types.h" #include "object/warning.h" #include "player/player-move.h" +#include "player/player-status-flags.h" #include "system/floor-type-definition.h" #include "system/object-type-definition.h" #include "util/bit-flags-calculator.h" @@ -140,7 +141,7 @@ void exe_movement(player_type *creature_ptr, DIRECTION dir, bool do_pickup, bool stormbringer = TRUE; feature_type *f_ptr = &f_info[g_ptr->feat]; - bool p_can_kill_walls = creature_ptr->kill_wall && has_flag(f_ptr->flags, FF_HURT_DISI) && (!p_can_enter || !has_flag(f_ptr->flags, FF_LOS)) + bool p_can_kill_walls = has_kill_wall(creature_ptr) && has_flag(f_ptr->flags, FF_HURT_DISI) && (!p_can_enter || !has_flag(f_ptr->flags, FF_LOS)) && !has_flag(f_ptr->flags, FF_PERMANENT); GAME_TEXT m_name[MAX_NLEN]; bool can_move = TRUE; diff --git a/src/player/player-status-flags.c b/src/player/player-status-flags.c index 29ac07b94..375f1a124 100644 --- a/src/player/player-status-flags.c +++ b/src/player/player-status-flags.c @@ -339,7 +339,7 @@ void has_no_flowed(player_type *creature_ptr) creature_ptr->no_flowed = FALSE; - if (has_pass_wall(creature_ptr) && !creature_ptr->kill_wall) + if (has_pass_wall(creature_ptr) && !has_kill_wall(creature_ptr)) creature_ptr->no_flowed = TRUE; for (int i = 0; i < INVEN_PACK; i++) { diff --git a/src/player/player-status.c b/src/player/player-status.c index 719077421..5a337d8f7 100644 --- a/src/player/player-status.c +++ b/src/player/player-status.c @@ -346,7 +346,6 @@ void calc_bonuses(player_type *creature_ptr) ARMOUR_CLASS old_dis_ac = creature_ptr->dis_ac; ARMOUR_CLASS old_dis_to_a = creature_ptr->dis_to_a; - creature_ptr->kill_wall = has_kill_wall(creature_ptr); creature_ptr->xtra_might = has_xtra_might(creature_ptr); creature_ptr->esp_evil = has_esp_evil(creature_ptr); creature_ptr->esp_animal = has_esp_animal(creature_ptr); diff --git a/src/player/player-status.h b/src/player/player-status.h index c1949c463..a381b3779 100644 --- a/src/player/player-status.h +++ b/src/player/player-status.h @@ -397,7 +397,6 @@ typedef struct player_type { BIT_FLAGS bless_blade; /* Blessed blade */ BIT_FLAGS xtra_might; /* Extra might bow */ BIT_FLAGS impact; /* Earthquake blows */ - bool kill_wall; BIT_FLAGS dec_mana; BIT_FLAGS easy_spell; BIT_FLAGS heavy_spell; diff --git a/src/spell-kind/earthquake.c b/src/spell-kind/earthquake.c index 3fb9e4210..410f236d4 100644 --- a/src/spell-kind/earthquake.c +++ b/src/spell-kind/earthquake.c @@ -90,7 +90,7 @@ bool earthquake(player_type *caster_ptr, POSITION cy, POSITION cx, POSITION r, M int sn = 0; POSITION sy = 0, sx = 0; - if (hurt && !has_pass_wall(caster_ptr) && !caster_ptr->kill_wall) { + if (hurt && !has_pass_wall(caster_ptr) && !has_kill_wall(caster_ptr)) { for (DIRECTION i = 0; i < 8; i++) { POSITION y = caster_ptr->y + ddy_ddd[i]; POSITION x = caster_ptr->x + ddx_ddd[i];