@rpg-engine/long-bow 0.8.101 → 0.8.103
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 +11 -11
- 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 +12 -12
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/SkillProgressBar.tsx +10 -10
- package/src/components/SkillsContainer.tsx +4 -4
package/dist/long-bow.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import React, { useState, useEffect, Component, useRef, useCallback, useContext,
|
|
|
2
2
|
import styled, { css, keyframes, createGlobalStyle } from 'styled-components';
|
|
3
3
|
import { BeatLoader } from 'react-spinners';
|
|
4
4
|
import { v4 } from 'uuid';
|
|
5
|
-
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, isMobileOrTablet, RewardType, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getLevelFromXP, getSkillConstants,
|
|
5
|
+
import { GRID_WIDTH, GRID_HEIGHT, ShortcutType, getItemTextureKeyPath, ItemContainerType, ItemType, DepotSocketEvents, ItemSocketEvents, ItemSocketEventsDisplayLabels, ActionsForInventory, ActionsForEquipmentSet, ActionsForLoot, ActionsForMapContainer, ItemQualityLevel, ItemRarities, ItemSubType, isMobile, TaskType, TaskStatus, isMobileOrTablet, RewardType, ItemSlotType, NPCSubtype, EntityAttackType, NPCAlignment, VideoGuideCategory, VideoGuideLanguage, CharacterClass, QuestStatus, getLevelFromXP, getSkillConstants, getLevelFromSPTiered, getXPForLevel, getSPForLevelTiered, MetadataType, PurchaseType, UserAccountTypes, PaymentCurrency, PeriodOfDay } from '@rpg-engine/shared';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
|
|
8
8
|
import { FaTimes, FaDiscord, FaWhatsapp, FaSearch, FaThumbtack, FaBoxOpen, FaChevronLeft, FaChevronRight, FaClipboardList, FaChevronUp, FaChevronDown, FaReddit, FaTrash, FaShoppingBag, FaInfoCircle, FaCartPlus, FaArrowLeft, FaHistory, FaShoppingCart } from 'react-icons/fa';
|
|
@@ -36544,12 +36544,12 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
36544
36544
|
// Character level: uses cubic formula (level³ * 3)
|
|
36545
36545
|
return Math.max(1, getLevelFromXP(currentSkillPoints));
|
|
36546
36546
|
}
|
|
36547
|
-
// Skills: use exponential formula with class-based constants
|
|
36547
|
+
// Skills: use tiered exponential formula with class-based constants
|
|
36548
36548
|
var _getSkillConstants = getSkillConstants(skillKey, effectiveClass),
|
|
36549
36549
|
A = _getSkillConstants.A,
|
|
36550
|
-
|
|
36550
|
+
baseAffinityB = _getSkillConstants.b,
|
|
36551
36551
|
c = _getSkillConstants.c;
|
|
36552
|
-
var actualLevel = Math.floor(
|
|
36552
|
+
var actualLevel = Math.floor(getLevelFromSPTiered(currentSkillPoints, A, baseAffinityB, c));
|
|
36553
36553
|
return Math.max(1, actualLevel); // Minimum level is always 1 in our system
|
|
36554
36554
|
};
|
|
36555
36555
|
var effectiveLevel = calculateEffectiveLevel();
|
|
@@ -36565,17 +36565,17 @@ var SkillProgressBar = function SkillProgressBar(_ref) {
|
|
|
36565
36565
|
var _progressInLevel = currentSkillPoints - currentLevelXP;
|
|
36566
36566
|
return Math.min(99.99, Math.max(0, _progressInLevel / Math.max(1, _range) * 100));
|
|
36567
36567
|
}
|
|
36568
|
-
// Skills: use exponential formula with class-based constants
|
|
36568
|
+
// Skills: use tiered exponential formula with class-based constants
|
|
36569
36569
|
var _getSkillConstants2 = getSkillConstants(skillKey, effectiveClass),
|
|
36570
36570
|
A = _getSkillConstants2.A,
|
|
36571
|
-
|
|
36571
|
+
baseAffinityB = _getSkillConstants2.b,
|
|
36572
36572
|
c = _getSkillConstants2.c;
|
|
36573
36573
|
// Get the actual calculated level (might be 0 for magic)
|
|
36574
|
-
var actualLevel = Math.floor(
|
|
36574
|
+
var actualLevel = Math.floor(getLevelFromSPTiered(currentSkillPoints, A, baseAffinityB, c));
|
|
36575
36575
|
var calcLevel = Math.max(c, actualLevel); // Use c as minimum for calculation
|
|
36576
36576
|
// Calculate SP thresholds based on actual position
|
|
36577
|
-
var currentLevelSP =
|
|
36578
|
-
var nextLevelSP =
|
|
36577
|
+
var currentLevelSP = getSPForLevelTiered(calcLevel, A, baseAffinityB, c);
|
|
36578
|
+
var nextLevelSP = getSPForLevelTiered(calcLevel + 1, A, baseAffinityB, c);
|
|
36579
36579
|
// Progress within current level range: (currentSP - currentLevelSP) / (nextLevelSP - currentLevelSP)
|
|
36580
36580
|
var range = nextLevelSP - currentLevelSP;
|
|
36581
36581
|
var progressInLevel = currentSkillPoints - currentLevelSP;
|
|
@@ -36741,14 +36741,14 @@ var SkillsContainer = function SkillsContainer(_ref) {
|
|
|
36741
36741
|
if (!skillDetails) {
|
|
36742
36742
|
return 0; // continue
|
|
36743
36743
|
}
|
|
36744
|
-
// Calculate skillPointsToNextLevel using exponential formula with character class
|
|
36744
|
+
// Calculate skillPointsToNextLevel using tiered exponential formula with character class
|
|
36745
36745
|
var calcSkillPointsToNextLevel = function calcSkillPointsToNextLevel() {
|
|
36746
36746
|
var effectiveClass = characterClass != null ? characterClass : CharacterClass.None;
|
|
36747
36747
|
var _getSkillConstants = getSkillConstants(key, effectiveClass),
|
|
36748
36748
|
A = _getSkillConstants.A,
|
|
36749
|
-
|
|
36749
|
+
baseAffinityB = _getSkillConstants.b,
|
|
36750
36750
|
c = _getSkillConstants.c;
|
|
36751
|
-
return Math.round(
|
|
36751
|
+
return Math.round(getSPForLevelTiered(skillDetails.level + 1, A, baseAffinityB, c));
|
|
36752
36752
|
};
|
|
36753
36753
|
output.push(React.createElement(SkillProgressBar, {
|
|
36754
36754
|
key: key,
|