@rpg-engine/long-bow 0.8.83 → 0.8.84

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.
@@ -36531,7 +36531,7 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
36531
36531
  b = _getSkillConstants.b,
36532
36532
  c = _getSkillConstants.c;
36533
36533
  var actualLevel = Math.floor(getLevelFromSP(currentSkillPoints, A, b, c));
36534
- return Math.max(c, actualLevel); // At least starting level
36534
+ return Math.max(1, actualLevel); // Minimum level is always 1 in our system
36535
36535
  };
36536
36536
  var effectiveLevel = calculateEffectiveLevel();
36537
36537
  // Calculate progress based on actual SP position
@@ -36548,12 +36548,15 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
36548
36548
  A = _getSkillConstants2.A,
36549
36549
  b = _getSkillConstants2.b,
36550
36550
  c = _getSkillConstants2.c;
36551
- // Calculate SP thresholds for current effective level
36552
- var spForEffectiveLevel = getSPForLevelExponential(effectiveLevel, A, b, c);
36553
- var spForNextLevel = getSPForLevelExponential(effectiveLevel + 1, A, b, c);
36554
- // Progress within current effective level
36555
- var range = spForNextLevel - spForEffectiveLevel;
36556
- var progressInLevel = currentSkillPoints - spForEffectiveLevel;
36551
+ // Get the actual calculated level (might be 0 for magic)
36552
+ var actualLevel = Math.floor(getLevelFromSP(currentSkillPoints, A, b, c));
36553
+ var calcLevel = Math.max(c, actualLevel); // Use c as minimum for calculation
36554
+ // Calculate SP thresholds based on actual position
36555
+ var spForCalcLevel = getSPForLevelExponential(calcLevel, A, b, c);
36556
+ var spForNextLevel = getSPForLevelExponential(calcLevel + 1, A, b, c);
36557
+ // Progress within current level range
36558
+ var range = spForNextLevel - spForCalcLevel;
36559
+ var progressInLevel = currentSkillPoints - spForCalcLevel;
36557
36560
  return Math.min(100, Math.max(0, progressInLevel / Math.max(1, range) * 100));
36558
36561
  };
36559
36562
  var progress = calculateProgress();