OSDN Git Service

Merge remote-tracking branch 'remotes/origin/feature/Refactor-Unnecessary-Files-Remov...
[hengband/hengband.git] / src / player / player-status-resist.c
index 47f5f5b..92326b0 100644 (file)
@@ -272,7 +272,7 @@ PERCENTAGE calc_shards_damage_rate(player_type *creature_ptr, rate_calc_type_mod
 {
     PERCENTAGE per = 100;
 
-    if (creature_ptr->resist_shard) {
+    if (has_resist_shard(creature_ptr)) {
         per *= 600;
         per /= randrate(4, 7, mode);
     }
@@ -363,7 +363,7 @@ PERCENTAGE calc_rocket_damage_rate(player_type *creature_ptr, rate_calc_type_mod
     (void)mode; // unused
     PERCENTAGE per = 100;
 
-    if (creature_ptr->resist_shard) {
+    if (has_resist_shard(creature_ptr)) {
         per /= 2;
     }
 
@@ -377,7 +377,7 @@ PERCENTAGE calc_nether_damage_rate(player_type *creature_ptr, rate_calc_type_mod
 {
     PERCENTAGE per = 100;
 
-    if (creature_ptr->resist_neth) {
+    if (has_resist_neth(creature_ptr)) {
         if (!is_specific_player_race(creature_ptr, RACE_SPECTRE))
             per *= 6;
         per *= 100;
@@ -395,7 +395,7 @@ PERCENTAGE calc_time_damage_rate(player_type *creature_ptr, rate_calc_type_mode
     (void)mode; // unused
     PERCENTAGE per = 100;
 
-    if (creature_ptr->resist_time) {
+    if (has_resist_time(creature_ptr)) {
         per *= 400;
         per /= randrate(4, 7, mode);
     }