OSDN Git Service

[Refactor] #40514 player_type の kill_wall 変数を廃止. / Abolished kill_wall variable in...
authordeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 06:02:48 +0000 (15:02 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Mon, 11 Jan 2021 06:02:48 +0000 (15:02 +0900)
src/action/movement-execution.c
src/player/player-status-flags.c
src/player/player-status.c
src/player/player-status.h
src/spell-kind/earthquake.c

index a71647b..69efe70 100644 (file)
@@ -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;
index 29ac07b..375f1a1 100644 (file)
@@ -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++) {
index 7190774..5a337d8 100644 (file)
@@ -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);
index c1949c4..a381b37 100644 (file)
@@ -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;
index 3fb9e42..410f236 100644 (file)
@@ -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];