OSDN Git Service

[Refactor] #40514 一部計算処理を calc_to_ac(), calc_to_ac_display() へ移動. / Moved some calcul...
authordeskull <deskull@users.sourceforge.jp>
Sat, 4 Jul 2020 06:34:28 +0000 (15:34 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sat, 4 Jul 2020 06:34:28 +0000 (15:34 +0900)
src/player/player-status.c

index b538353..578cc61 100644 (file)
@@ -1485,8 +1485,6 @@ void calc_bonuses(player_type *creature_ptr)
                if (hex_spelling(creature_ptr, HEX_ICE_ARMOR))
                {
                        creature_ptr->sh_cold = TRUE;
-                       creature_ptr->to_a += 30;
-                       creature_ptr->dis_to_a += 30;
                }
 
                if (hex_spelling(creature_ptr, HEX_SHOCK_CLOAK))
@@ -3960,6 +3958,12 @@ static void calc_to_ac(player_type *creature_ptr)
         }
     }
 
+       if (creature_ptr->realm1 == REALM_HEX) {
+        if (hex_spelling(creature_ptr, HEX_ICE_ARMOR)) {
+            creature_ptr->to_a += 30;
+        }
+    }
+
        if (creature_ptr->special_defense & KAMAE_BYAKKO) {
         creature_ptr->to_a -= 40;
     } else if (creature_ptr->special_defense & KAMAE_SEIRYU) {
@@ -4020,6 +4024,12 @@ static void calc_to_ac_display(player_type *creature_ptr)
         creature_ptr->dis_to_a += 10 + (creature_ptr->lev * 2 / 5);
     }
 
+       if (creature_ptr->realm1 == REALM_HEX) {
+        if (hex_spelling(creature_ptr, HEX_ICE_ARMOR)) {
+            creature_ptr->dis_to_a += 30;
+        }
+    }
+
     if (creature_ptr->muta3) {
         if (creature_ptr->muta3 & MUT3_WART_SKIN) {
             creature_ptr->dis_to_a += 5;