@rpg-engine/shared 0.9.75 → 0.9.76

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.
@@ -0,0 +1,2 @@
1
+ export declare const MINIMUM_MINUTES_FOR_WATERING: number;
2
+ //# sourceMappingURL=farming.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"farming.constants.d.ts","sourceRoot":"","sources":["../../src/constants/farming.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B,EAAE,MAAW,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MINIMUM_MINUTES_FOR_WATERING = void 0;
4
+ exports.MINIMUM_MINUTES_FOR_WATERING = 20;
5
+ //# sourceMappingURL=farming.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"farming.constants.js","sourceRoot":"","sources":["../../src/constants/farming.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAW,EAAE,CAAC"}
@@ -2,4 +2,5 @@ export declare const getSPForLevel: (level: number) => number;
2
2
  export declare const getXPForLevel: (level: number) => number;
3
3
  export declare const calculateXPToNextLevel: (currentXP: number, level: number) => number;
4
4
  export declare const calculateSPToNextLevel: (currentSP: number, level: number) => number;
5
+ export declare const getTokensToNextLevel: (elementalLevel: number, guildLevel: number) => number;
5
6
  //# sourceMappingURL=skillHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"skillHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/skillHelpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,MAG7C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,MAG7C,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,SAAS,MAAM,KAAG,MAKzE,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,SAAS,MAAM,KAAG,MAKzE,CAAC"}
1
+ {"version":3,"file":"skillHelpers.d.ts","sourceRoot":"","sources":["../../src/helpers/skillHelpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,MAG7C,CAAC;AAEF,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,MAG7C,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,SAAS,MAAM,KAAG,MAKzE,CAAC;AAEF,eAAO,MAAM,sBAAsB,cAAe,MAAM,SAAS,MAAM,KAAG,MAKzE,CAAC;AAEF,eAAO,MAAM,oBAAoB,mBAAoB,MAAM,cAAc,MAAM,KAAG,MAOjF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.calculateSPToNextLevel = exports.calculateXPToNextLevel = exports.getXPForLevel = exports.getSPForLevel = void 0;
3
+ exports.getTokensToNextLevel = exports.calculateSPToNextLevel = exports.calculateXPToNextLevel = exports.getXPForLevel = exports.getSPForLevel = void 0;
4
4
  const getSPForLevel = (level) => {
5
5
  const totalSPOnLevel = Math.pow(level, 3) * 2.75;
6
6
  return totalSPOnLevel;
@@ -23,4 +23,13 @@ const calculateSPToNextLevel = (currentSP, level) => {
23
23
  return spToNextLevelDiff;
24
24
  };
25
25
  exports.calculateSPToNextLevel = calculateSPToNextLevel;
26
+ const getTokensToNextLevel = (elementalLevel, guildLevel) => {
27
+ const baseValue = 100;
28
+ const rate = 1.005;
29
+ const levelFactor = Math.pow(elementalLevel, 0.5);
30
+ const guildFactor = Math.pow(guildLevel, 0.3);
31
+ const tokens = baseValue * levelFactor * guildFactor;
32
+ return Math.floor(tokens * Math.pow(rate, elementalLevel - 1));
33
+ };
34
+ exports.getTokensToNextLevel = getTokensToNextLevel;
26
35
  //# sourceMappingURL=skillHelpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skillHelpers.js","sourceRoot":"","sources":["../../src/helpers/skill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O/B"}
@@ -0,0 +1,13 @@
1
+ export declare enum PlantSocketEvents {
2
+ ShowPlantGrowth = "ShowPlantGrowth",
3
+ SendGrowthPoint = "SendGrowthPoint"
4
+ }
5
+ export interface IPlantGrowth {
6
+ id: string;
7
+ }
8
+ export interface IPlantShowGrowth {
9
+ status: boolean;
10
+ currentCycle: number;
11
+ requiredGrowthPoints: number;
12
+ }
13
+ //# sourceMappingURL=plant.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plant.types.d.ts","sourceRoot":"","sources":["../../src/types/plant.types.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;CAC9B"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlantSocketEvents = void 0;
4
+ var PlantSocketEvents;
5
+ (function (PlantSocketEvents) {
6
+ PlantSocketEvents["ShowPlantGrowth"] = "ShowPlantGrowth";
7
+ PlantSocketEvents["SendGrowthPoint"] = "SendGrowthPoint";
8
+ })(PlantSocketEvents = exports.PlantSocketEvents || (exports.PlantSocketEvents = {}));
9
+ //# sourceMappingURL=plant.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plant.types.js","sourceRoot":"","sources":["../../src/types/plant.types.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,wDAAmC,CAAA;IACnC,wDAAmC,CAAA;AACrC,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B"}
@@ -0,0 +1,7 @@
1
+ export interface ISimpleTutorialWithKey {
2
+ key: string;
3
+ }
4
+ export declare enum SimpleTutorialSocketEvents {
5
+ SimpleTutorialWithKey = "SimpleTutorialWithKey"
6
+ }
7
+ //# sourceMappingURL=simpleTutorial.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpleTutorial.d.ts","sourceRoot":"","sources":["../../src/types/simpleTutorial.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,GAAG,EAAE,MAAM,CAAC;CACb;AAID,oBAAY,0BAA0B;IACpC,qBAAqB,0BAA0B;CAChD"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SimpleTutorialSocketEvents = void 0;
4
+ var SimpleTutorialSocketEvents;
5
+ (function (SimpleTutorialSocketEvents) {
6
+ SimpleTutorialSocketEvents["SimpleTutorialWithKey"] = "SimpleTutorialWithKey";
7
+ })(SimpleTutorialSocketEvents = exports.SimpleTutorialSocketEvents || (exports.SimpleTutorialSocketEvents = {}));
8
+ //# sourceMappingURL=simpleTutorial.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simpleTutorial.js","sourceRoot":"","sources":["../../src/types/simpleTutorial.ts"],"names":[],"mappings":";;;AAMA,IAAY,0BAEX;AAFD,WAAY,0BAA0B;IACpC,6EAA+C,CAAA;AACjD,CAAC,EAFW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAErC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/shared",
3
- "version": "0.9.75",
3
+ "version": "0.9.76",
4
4
  "description": "Types shared across our API and client",
5
5
  "author": "Definya Team",
6
6
  "homepage": "",