From de42efd2d8679671dfe7345ba7620ba0b158cb4c Mon Sep 17 00:00:00 2001 From: Or Gold Date: Sat, 23 Oct 2021 17:31:09 +0300 Subject: [PATCH] Fix strdex optimizer --- js/builder.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/builder.js b/js/builder.js index fc8ec3c..2e7e194 100644 --- a/js/builder.js +++ b/js/builder.js @@ -976,6 +976,8 @@ function optimizeStrDex() { const base_skillpoints = player_build.base_skillpoints; const max_str_boost = 100 - base_skillpoints[0]; const max_dex_boost = 100 - base_skillpoints[1]; + if (Math.min(remaining, max_str_boost, max_dex_boost) < 0) return; // Unwearable + const base_total_skillpoints = player_build.total_skillpoints; let str_bonus = remaining; let dex_bonus = 0;