@rpg-engine/long-bow 0.6.57 → 0.6.58
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 +9 -3
- 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 +9 -3
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SkillProgressBar.tsx +12 -8
- package/src/mocks/skills.mocks.ts +4 -4
|
@@ -32143,10 +32143,16 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
32143
32143
|
atlasIMG = _ref.atlasIMG,
|
|
32144
32144
|
atlasJSON = _ref.atlasJSON,
|
|
32145
32145
|
buffAndDebuff = _ref.buffAndDebuff;
|
|
32146
|
-
//
|
|
32147
|
-
var
|
|
32146
|
+
// Skill points needed to start the current level
|
|
32147
|
+
var baseSkillPoints = shared.getSPForLevel(level);
|
|
32148
|
+
// Skill points needed to reach the next level
|
|
32149
|
+
var pointsToNextLevel = skillPointsToNextLevel;
|
|
32150
|
+
// Calculate the range of points for the current level
|
|
32151
|
+
var totalPointsForLevelUp = pointsToNextLevel - baseSkillPoints;
|
|
32152
|
+
// Calculate excess skill points above the previous level
|
|
32153
|
+
var excessSkillPoints = currentSkillPoints - baseSkillPoints;
|
|
32148
32154
|
// Calculate progress percentage towards the next level
|
|
32149
|
-
var progress = Math.min(100, Math.max(0,
|
|
32155
|
+
var progress = Math.min(100, Math.max(0, excessSkillPoints / totalPointsForLevelUp * 100));
|
|
32150
32156
|
var skillsBuffsCalc = function skillsBuffsCalc(level, buffAndDebuff) {
|
|
32151
32157
|
var result = level * (buffAndDebuff / 100);
|
|
32152
32158
|
return result > 0 ? "+" + result.toFixed(2) : "" + result.toFixed(2);
|