From a55c1382b1bc85ce8c5a9a434ef74864383ca333 Mon Sep 17 00:00:00 2001 From: Thaum Rystra Date: Sun, 24 May 2020 04:30:14 +0200 Subject: [PATCH] Fixed skills not computing below zero --- app/imports/api/creature/computation/combineStat.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/imports/api/creature/computation/combineStat.js b/app/imports/api/creature/computation/combineStat.js index b8fd76c8..9efb0023 100644 --- a/app/imports/api/creature/computation/combineStat.js +++ b/app/imports/api/creature/computation/combineStat.js @@ -51,7 +51,7 @@ function combineSkill(stat, aggregator, memo){ if (typeof profBonus !== 'number' && memo.statsByVariableName['level']){ let level = memo.statsByVariableName['level'].value; - profBonus = Math.floor(level / 4 + 1.75); + profBonus = Math.ceil(level / 4) + 1; } // Multiply the proficiency bonus by the actual proficiency profBonus *= stat.proficiency; @@ -60,7 +60,6 @@ function combineSkill(stat, aggregator, memo){ if (result < aggregator.min) result = aggregator.min; if (result > aggregator.max) result = aggregator.max; result = Math.floor(result); - if (aggregator.base > result) result = aggregator.base; stat.value = result; // Advantage/disadvantage if (aggregator.advantage && !aggregator.disadvantage){