@rpg-engine/long-bow 0.6.59 → 0.6.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +7 -8
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +7 -8
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SkillProgressBar.tsx +15 -15
- package/src/mocks/skills.mocks.ts +6 -6
|
@@ -32147,15 +32147,14 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
32147
32147
|
buffAndDebuff = _ref.buffAndDebuff;
|
|
32148
32148
|
// Skill points needed to start the current level
|
|
32149
32149
|
var baseSkillPoints = shared.getSPForLevel(level);
|
|
32150
|
-
|
|
32151
|
-
|
|
32152
|
-
|
|
32153
|
-
|
|
32154
|
-
|
|
32155
|
-
var
|
|
32156
|
-
// Calculate progress percentage towards the next level
|
|
32157
|
-
var progress = Math.min(100, Math.max(0, excessSkillPoints / totalPointsForLevelUp * 100));
|
|
32150
|
+
var calculateProgress = function calculateProgress() {
|
|
32151
|
+
var totalPointsForLevelUp = Math.max(1, skillPointsToNextLevel - baseSkillPoints);
|
|
32152
|
+
var excessSkillPoints = Math.max(0, currentSkillPoints - baseSkillPoints);
|
|
32153
|
+
return Math.min(100, Math.max(0, excessSkillPoints / totalPointsForLevelUp * 100));
|
|
32154
|
+
};
|
|
32155
|
+
var progress = calculateProgress();
|
|
32158
32156
|
var skillsBuffsCalc = function skillsBuffsCalc(level, buffAndDebuff) {
|
|
32157
|
+
if (buffAndDebuff === 0) return '0';
|
|
32159
32158
|
var result = level * (buffAndDebuff / 100);
|
|
32160
32159
|
return result > 0 ? "+" + result.toFixed(2) : "" + result.toFixed(2);
|
|
32161
32160
|
};
|