sekai-calculator 0.4.3 → 0.4.4
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/index.cjs +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +5 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -78,15 +78,15 @@ class DeckService {
|
|
|
78
78
|
.map(async (id) => await this.getUserCard(id === null ? 0 : id)));
|
|
79
79
|
}
|
|
80
80
|
static toUserChallengeLiveSoloDeck(userCards, characterId) {
|
|
81
|
-
if (userCards.length
|
|
82
|
-
throw new Error('deck card should
|
|
81
|
+
if (userCards.length < 2)
|
|
82
|
+
throw new Error('deck card should more than 1');
|
|
83
83
|
return {
|
|
84
84
|
characterId,
|
|
85
85
|
leader: userCards[0].cardId,
|
|
86
86
|
support1: userCards[1].cardId,
|
|
87
|
-
support2: userCards[2].cardId,
|
|
88
|
-
support3: userCards[3].cardId,
|
|
89
|
-
support4: userCards[4].cardId
|
|
87
|
+
support2: userCards.length < 3 ? null : userCards[2].cardId,
|
|
88
|
+
support3: userCards.length < 4 ? null : userCards[3].cardId,
|
|
89
|
+
support4: userCards.length < 5 ? null : userCards[4].cardId
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -345,9 +345,9 @@ interface GameCharacter {
|
|
|
345
345
|
id: number;
|
|
346
346
|
seq: number;
|
|
347
347
|
resourceId: number;
|
|
348
|
-
firstName
|
|
348
|
+
firstName?: string;
|
|
349
349
|
givenName: string;
|
|
350
|
-
firstNameRuby
|
|
350
|
+
firstNameRuby?: string;
|
|
351
351
|
givenNameRuby: string;
|
|
352
352
|
gender: string;
|
|
353
353
|
height: number;
|
package/dist/index.mjs
CHANGED
|
@@ -76,15 +76,15 @@ class DeckService {
|
|
|
76
76
|
.map(async (id) => await this.getUserCard(id === null ? 0 : id)));
|
|
77
77
|
}
|
|
78
78
|
static toUserChallengeLiveSoloDeck(userCards, characterId) {
|
|
79
|
-
if (userCards.length
|
|
80
|
-
throw new Error('deck card should
|
|
79
|
+
if (userCards.length < 2)
|
|
80
|
+
throw new Error('deck card should more than 1');
|
|
81
81
|
return {
|
|
82
82
|
characterId,
|
|
83
83
|
leader: userCards[0].cardId,
|
|
84
84
|
support1: userCards[1].cardId,
|
|
85
|
-
support2: userCards[2].cardId,
|
|
86
|
-
support3: userCards[3].cardId,
|
|
87
|
-
support4: userCards[4].cardId
|
|
85
|
+
support2: userCards.length < 3 ? null : userCards[2].cardId,
|
|
86
|
+
support3: userCards.length < 4 ? null : userCards[3].cardId,
|
|
87
|
+
support4: userCards.length < 5 ? null : userCards[4].cardId
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
}
|