@rpg-engine/shared 0.6.41 → 0.6.43
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/skillHelpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,
|
|
1
|
+
{"version":3,"file":"skillHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/skillHelpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,MAK7C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,MAK7C,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,SAAS,MAAM,KAAG,MAKzE,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,SAAS,MAAM,KAAG,MAKzE,CAAC"}
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.calculateSPToNextLevel = exports.calculateXPToNextLevel = exports.getXPForLevel = exports.getSPForLevel = void 0;
|
|
4
4
|
const getSPForLevel = (level) => {
|
|
5
|
-
const
|
|
6
|
-
|
|
5
|
+
const baseSP = 100;
|
|
6
|
+
const exponentialSP = Math.pow(level, 1.5) * 25;
|
|
7
|
+
const logarithmicSP = Math.log(level) * 100;
|
|
8
|
+
return Math.round(baseSP + exponentialSP + logarithmicSP);
|
|
7
9
|
};
|
|
8
10
|
exports.getSPForLevel = getSPForLevel;
|
|
9
11
|
const getXPForLevel = (level) => {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
+
const baseXP = 100;
|
|
13
|
+
const exponentialXP = Math.pow(level, 2.5) * 25;
|
|
14
|
+
const logarithmicXP = Math.log(level) * 100;
|
|
15
|
+
return Math.round(baseXP + exponentialXP + logarithmicXP);
|
|
12
16
|
};
|
|
13
17
|
exports.getXPForLevel = getXPForLevel;
|
|
14
18
|
const calculateXPToNextLevel = (currentXP, level) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skillHelpers.js","sourceRoot":"","sources":["../../src/helpers/skillHelpers.ts"],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IACrD,MAAM,
|
|
1
|
+
{"version":3,"file":"skillHelpers.js","sourceRoot":"","sources":["../../src/helpers/skillHelpers.ts"],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IACrD,MAAM,MAAM,GAAG,GAAG,CAAC;IACnB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IAChD,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;IAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC,CAAC;AAC5D,CAAC,CAAC;AALW,QAAA,aAAa,iBAKxB;AAEK,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IACrD,MAAM,MAAM,GAAG,GAAG,CAAC;IACnB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IAChD,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;IAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,aAAa,GAAG,aAAa,CAAC,CAAC;AAC5D,CAAC,CAAC;AALW,QAAA,aAAa,iBAKxB;AAEK,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAE,KAAa,EAAU,EAAE;IACjF,MAAM,aAAa,GAAG,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,i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