From 38688304f9fbb63cb175b25e2a40e3b25288be48 Mon Sep 17 00:00:00 2001 From: b Date: Wed, 14 Apr 2021 15:29:10 -0700 Subject: [PATCH] Floor cap --- build2.js | 2 +- builder2.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build2.js b/build2.js index 38890f5..b74e403 100644 --- a/build2.js +++ b/build2.js @@ -391,7 +391,7 @@ class Build{ getSpellCost(spellIdx, cost) { cost = Math.ceil(cost * (1 - skillPointsToPercentage(this.total_skillpoints[2]))); - cost = Math.floor(cost * (1 + this.statMap.get("spPct"+spellIdx) / 100)) + cost = Math.max(0, Math.floor(cost * (1 + this.statMap.get("spPct"+spellIdx) / 100))); return Math.max(1, cost + this.statMap.get("spRaw"+spellIdx)); } diff --git a/builder2.html b/builder2.html index e0ddc2a..c330e78 100644 --- a/builder2.html +++ b/builder2.html @@ -33,7 +33,7 @@ -
Raw after % bby
+
Raw after % bby (also % caps at -100)