OSDN Git Service

[Fix] #41342 忍者の盾なし隠密加算が全職に入っていた不具合を修正. / Fix Ninja's stealth bonus added to all...
authordeskull <deskull@users.sourceforge.jp>
Tue, 26 Jan 2021 23:23:09 +0000 (08:23 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Tue, 26 Jan 2021 23:23:09 +0000 (08:23 +0900)
 * if文で一度忍者かどうかを囲わないといけなかった。

src/player/player-status.c

index e6eaaa1..3c60b5e 100644 (file)
@@ -1268,11 +1268,13 @@ static ACTION_SKILL_POWER calc_stealth(player_type *creature_ptr)
         pow -= 7;
     }
 
-    if (creature_ptr->pclass == CLASS_NINJA && heavy_armor(creature_ptr)) {
-        pow -= (creature_ptr->lev) / 10;
-    } else if ((!creature_ptr->inventory_list[INVEN_RARM].k_idx || has_right_hand_weapon(creature_ptr))
-        && (!creature_ptr->inventory_list[INVEN_LARM].k_idx || has_left_hand_weapon(creature_ptr))) {
-        pow += (creature_ptr->lev) / 10;
+    if (creature_ptr->pclass == CLASS_NINJA) {
+        if (heavy_armor(creature_ptr)) {
+            pow -= (creature_ptr->lev) / 10;
+        } else if ((!creature_ptr->inventory_list[INVEN_RARM].k_idx || has_right_hand_weapon(creature_ptr))
+            && (!creature_ptr->inventory_list[INVEN_LARM].k_idx || has_left_hand_weapon(creature_ptr))) {
+            pow += (creature_ptr->lev) / 10;
+        }
     }
 
     if (is_time_limit_stealth(creature_ptr))