@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.8.83",
3
+ "version": "0.8.84",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -84,7 +84,7 @@
84
84
  "dependencies": {
85
85
  "@capacitor/core": "^6.1.0",
86
86
  "@rollup/plugin-image": "^2.1.1",
87
- "@rpg-engine/shared": "^0.10.32",
87
+ "@rpg-engine/shared": "^0.10.33",
88
88
  "dayjs": "^1.11.2",
89
89
  "font-awesome": "^4.7.0",
90
90
  "fs-extra": "^10.1.0",
@@ -54,7 +54,7 @@ export const SkillProgressBar: React.FC<ISkillProgressBarProps> = ({
54
54
 
55
55
  const { A, b, c } = getSkillConstants(skillKey, effectiveClass);
56
56
  const actualLevel = Math.floor(getLevelFromSP(currentSkillPoints, A, b, c));
57
- return Math.max(c, actualLevel); // At least starting level
57
+ return Math.max(1, actualLevel); // Minimum level is always 1 in our system
58
58
  };
59
59
 
60
60
  const effectiveLevel = calculateEffectiveLevel();
@@ -72,13 +72,17 @@ export const SkillProgressBar: React.FC<ISkillProgressBarProps> = ({
72
72
 
73
73
  const { A, b, c } = getSkillConstants(skillKey, effectiveClass);
74
74
 
75
- // Calculate SP thresholds for current effective level
76
- const spForEffectiveLevel = getSPForLevelExponential(effectiveLevel, A, b, c);
77
- const spForNextLevel = getSPForLevelExponential(effectiveLevel + 1, A, b, c);
75
+ // Get the actual calculated level (might be 0 for magic)
76
+ const actualLevel = Math.floor(getLevelFromSP(currentSkillPoints, A, b, c));
77
+ const calcLevel = Math.max(c, actualLevel); // Use c as minimum for calculation
78
+
79
+ // Calculate SP thresholds based on actual position
80
+ const spForCalcLevel = getSPForLevelExponential(calcLevel, A, b, c);
81
+ const spForNextLevel = getSPForLevelExponential(calcLevel + 1, A, b, c);
78
82
 
79
- // Progress within current effective level
80
- const range = spForNextLevel - spForEffectiveLevel;
81
- const progressInLevel = currentSkillPoints - spForEffectiveLevel;
83
+ // Progress within current level range
84
+ const range = spForNextLevel - spForCalcLevel;
85
+ const progressInLevel = currentSkillPoints - spForCalcLevel;
82
86
 
83
87
  return Math.min(100, Math.max(0, (progressInLevel / Math.max(1, range)) * 100));
84
88
  };
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  ISkill,
3
3
  SkillType,
4
- getSPForLevel,
5
4
  getSPForLevelExponential,
6
5
  getSkillConstants,
7
6
  CharacterClass,