sekai-calculator 0.0.6 → 0.0.8
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/README.md +1 -2
- package/dist/{index.js → index.cjs} +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/{index.es.js → index.mjs} +3 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
# sekai-calculator
|
|
2
2
|
Project SEKAI Calculator for deck power, live score, event point and more.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
- Node.js >= 18
|
|
4
|
+
Both ECMAScript Module `index.mjs` and CommonJS `index.cjs` are provided with types `index.d.ts` attached.
|
|
6
5
|
|
|
7
6
|
## Quick Start
|
|
8
7
|
W.I.P.
|
|
@@ -69,6 +69,9 @@ class EventCalculator {
|
|
|
69
69
|
const deckCards = await this.deckCalculator.getDeckCards(userDeck);
|
|
70
70
|
return await deckCards.reduce(async (v, it) => await this.getCardEventBonus(it, eventId) + await v, Promise.resolve(0));
|
|
71
71
|
}
|
|
72
|
+
async getDeckEventBonusById(deckId, eventId) {
|
|
73
|
+
return await this.getDeckEventBonus(await this.deckCalculator.getDeck(deckId), eventId);
|
|
74
|
+
}
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
exports.EventCalculator = EventCalculator;
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare class EventCalculator {
|
|
|
32
32
|
private getEventDeckBonus;
|
|
33
33
|
getCardEventBonus(userCard: UserCard, eventId: number): Promise<number>;
|
|
34
34
|
getDeckEventBonus(userDeck: UserDeck, eventId: number): Promise<number>;
|
|
35
|
+
getDeckEventBonusById(deckId: number, eventId: number): Promise<number>;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
interface AreaItemLevel {
|
|
@@ -67,6 +67,9 @@ class EventCalculator {
|
|
|
67
67
|
const deckCards = await this.deckCalculator.getDeckCards(userDeck);
|
|
68
68
|
return await deckCards.reduce(async (v, it) => await this.getCardEventBonus(it, eventId) + await v, Promise.resolve(0));
|
|
69
69
|
}
|
|
70
|
+
async getDeckEventBonusById(deckId, eventId) {
|
|
71
|
+
return await this.getDeckEventBonus(await this.deckCalculator.getDeck(deckId), eventId);
|
|
72
|
+
}
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
export { EventCalculator };
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sekai-calculator",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "Project SEKAI Calculator for deck power, live score, event point and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
-
"main": "dist/index.
|
|
8
|
-
"module": "dist/index.
|
|
7
|
+
"main": "dist/index.cjs",
|
|
8
|
+
"module": "dist/index.mjs",
|
|
9
9
|
"files": [
|
|
10
|
-
"dist/index.
|
|
11
|
-
"dist/index.
|
|
10
|
+
"dist/index.cjs",
|
|
11
|
+
"dist/index.mjs",
|
|
12
12
|
"dist/index.d.ts"
|
|
13
13
|
],
|
|
14
14
|
"keywords": [
|