OSDN Git Service

[Refactor] #40514 忍者の職業適性による隠密計算整理. / Clear stealth calculation by Ninja's specification.
authordeskull <deskull@users.sourceforge.jp>
Thu, 13 Aug 2020 05:22:44 +0000 (14:22 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Thu, 13 Aug 2020 05:22:44 +0000 (14:22 +0900)
src/player/player-class.c
src/player/player-status.c

index 0b0c666..a155ac2 100644 (file)
@@ -1207,13 +1207,6 @@ void calc_class_status(player_type *creature_ptr)
         creature_ptr->redraw |= PR_STATUS;
         break;
     case CLASS_NINJA:
-        if (heavy_armor(creature_ptr)) {
-            creature_ptr->skill_stl -= (creature_ptr->lev) / 10;
-        } else if ((!creature_ptr->inventory_list[INVEN_RARM].k_idx || creature_ptr->right_hand_weapon)
-            && (!creature_ptr->inventory_list[INVEN_LARM].k_idx || creature_ptr->left_hand_weapon)) {
-            creature_ptr->skill_stl += (creature_ptr->lev) / 10;
-        }
-
         if ((!creature_ptr->inventory_list[INVEN_RARM].k_idx || creature_ptr->right_hand_weapon)
             && (!creature_ptr->inventory_list[INVEN_LARM].k_idx || creature_ptr->left_hand_weapon)) {
             creature_ptr->to_a += creature_ptr->lev / 2 + 5;
index 4bcc86c..289db7a 100644 (file)
@@ -1562,6 +1562,13 @@ static void calc_stealth(player_type *creature_ptr)
         creature_ptr->skill_stl -= 7;
     }
 
+       if (creature_ptr->pclass == CLASS_NINJA && heavy_armor(creature_ptr)) {
+        creature_ptr->skill_stl -= (creature_ptr->lev) / 10;
+    } else if ((!creature_ptr->inventory_list[INVEN_RARM].k_idx || creature_ptr->right_hand_weapon)
+        && (!creature_ptr->inventory_list[INVEN_LARM].k_idx || creature_ptr->left_hand_weapon)) {
+        creature_ptr->skill_stl += (creature_ptr->lev) / 10;
+    }
+
     if (is_time_limit_stealth(creature_ptr))
         creature_ptr->skill_stl += 99;