Merge pull request #11 from Or-Gold/master

Fix strdex optimizer (possibly/partially)
This commit is contained in:
hppeng-wynn 2021-10-24 13:21:26 -07:00 committed by GitHub
commit 0179b4760e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -976,6 +976,8 @@ function optimizeStrDex() {
const base_skillpoints = player_build.base_skillpoints; const base_skillpoints = player_build.base_skillpoints;
const max_str_boost = 100 - base_skillpoints[0]; const max_str_boost = 100 - base_skillpoints[0];
const max_dex_boost = 100 - base_skillpoints[1]; 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; const base_total_skillpoints = player_build.total_skillpoints;
let str_bonus = remaining; let str_bonus = remaining;
let dex_bonus = 0; let dex_bonus = 0;