sekai-calculator 0.6.1 → 0.6.3
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 +3 -0
- package/dist/index.d.ts +14 -1
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -643,6 +643,8 @@ class BaseDeckRecommend {
|
|
|
643
643
|
if (deckCards.length >= 1 && card.attr !== deckCards[0].attr && !containsAny(deckCards[0].units, card.units)) {
|
|
644
644
|
continue;
|
|
645
645
|
}
|
|
646
|
+
if (deckCards.length >= 2 && CardCalculator.isCertainlyLessThan(deckCards[deckCards.length - 1], card))
|
|
647
|
+
continue;
|
|
646
648
|
if (deckCards.length >= 2 && !CardCalculator.isCertainlyLessThan(card, deckCards[deckCards.length - 1]) &&
|
|
647
649
|
card.cardId < deckCards[deckCards.length - 1].cardId) {
|
|
648
650
|
continue;
|
|
@@ -735,6 +737,7 @@ class MusicRecommend {
|
|
|
735
737
|
}
|
|
736
738
|
}
|
|
737
739
|
|
|
740
|
+
exports.BaseDeckRecommend = BaseDeckRecommend;
|
|
738
741
|
exports.CachedDataProvider = CachedDataProvider;
|
|
739
742
|
exports.CardCalculator = CardCalculator;
|
|
740
743
|
exports.CardEventCalculator = CardEventCalculator;
|
package/dist/index.d.ts
CHANGED
|
@@ -271,6 +271,19 @@ declare class EventCalculator {
|
|
|
271
271
|
static getDeckEventPoint(deckCards: CardDetail[], honorBonus: number, musicMeta: MusicMeta, liveType: LiveType): number;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
+
declare class BaseDeckRecommend {
|
|
275
|
+
private readonly dataProvider;
|
|
276
|
+
private readonly cardCalculator;
|
|
277
|
+
private readonly deckCalculator;
|
|
278
|
+
constructor(dataProvider: DataProvider);
|
|
279
|
+
private static canMakeEventDeck;
|
|
280
|
+
private static filterCard;
|
|
281
|
+
private static findBestCards;
|
|
282
|
+
recommendHighScoreDeck(userCards: UserCard[], scoreFunc: ScoreFunction, { musicMeta, limit, member, cardConfig }: DeckRecommendConfig, eventId?: number, isChallengeLive?: boolean): Promise<RecommendDeck[]>;
|
|
283
|
+
static getLiveScoreFunction(liveType: LiveType): ScoreFunction;
|
|
284
|
+
static getEventPointFunction(liveType: LiveType): ScoreFunction;
|
|
285
|
+
}
|
|
286
|
+
type ScoreFunction = (musicMeta: MusicMeta, honorBonus: number, deckCards: CardDetail[]) => number;
|
|
274
287
|
interface RecommendDeck {
|
|
275
288
|
score: number;
|
|
276
289
|
power: number;
|
|
@@ -554,4 +567,4 @@ interface UserHonor {
|
|
|
554
567
|
level: number;
|
|
555
568
|
}
|
|
556
569
|
|
|
557
|
-
export { AreaItemLevel, CachedDataProvider, Card, CardCalculator, CardConfig, CardDetail, CardEpisode, CardEventCalculator, CardPowerCalculator, CardRarity, CardSkillCalculator, ChallengeLiveDeckRecommend, CharacterRank, DataProvider, DeckCalculator, DeckDetail, DeckService, EventCalculator, EventCard, EventDeckBonus, EventDeckRecommend, EventRarityBonusRate, GameCharacter, GameCharacterUnit, Honor, LiveCalculator, LiveDetail, LiveSkill, LiveType, MasterLesson, Music, MusicDifficulty, MusicMeta, MusicRecommend, Skill, SkillDetail, User, UserArea, UserCard, UserChallengeLiveSoloDeck, UserCharacter, UserDeck, UserHonor };
|
|
570
|
+
export { AreaItemLevel, BaseDeckRecommend, CachedDataProvider, Card, CardCalculator, CardConfig, CardDetail, CardEpisode, CardEventCalculator, CardPowerCalculator, CardRarity, CardSkillCalculator, ChallengeLiveDeckRecommend, CharacterRank, DataProvider, DeckCalculator, DeckDetail, DeckRecommendConfig, DeckService, EventCalculator, EventCard, EventDeckBonus, EventDeckRecommend, EventRarityBonusRate, GameCharacter, GameCharacterUnit, Honor, LiveCalculator, LiveDetail, LiveSkill, LiveType, MasterLesson, Music, MusicDifficulty, MusicMeta, MusicRecommend, RecommendDeck, ScoreFunction, Skill, SkillDetail, User, UserArea, UserCard, UserChallengeLiveSoloDeck, UserCharacter, UserDeck, UserHonor };
|
package/dist/index.mjs
CHANGED
|
@@ -641,6 +641,8 @@ class BaseDeckRecommend {
|
|
|
641
641
|
if (deckCards.length >= 1 && card.attr !== deckCards[0].attr && !containsAny(deckCards[0].units, card.units)) {
|
|
642
642
|
continue;
|
|
643
643
|
}
|
|
644
|
+
if (deckCards.length >= 2 && CardCalculator.isCertainlyLessThan(deckCards[deckCards.length - 1], card))
|
|
645
|
+
continue;
|
|
644
646
|
if (deckCards.length >= 2 && !CardCalculator.isCertainlyLessThan(card, deckCards[deckCards.length - 1]) &&
|
|
645
647
|
card.cardId < deckCards[deckCards.length - 1].cardId) {
|
|
646
648
|
continue;
|
|
@@ -733,4 +735,4 @@ class MusicRecommend {
|
|
|
733
735
|
}
|
|
734
736
|
}
|
|
735
737
|
|
|
736
|
-
export { CachedDataProvider, CardCalculator, CardEventCalculator, CardPowerCalculator, CardSkillCalculator, ChallengeLiveDeckRecommend, DeckCalculator, DeckService, EventCalculator, EventDeckRecommend, LiveCalculator, LiveType, MusicRecommend };
|
|
738
|
+
export { BaseDeckRecommend, CachedDataProvider, CardCalculator, CardEventCalculator, CardPowerCalculator, CardSkillCalculator, ChallengeLiveDeckRecommend, DeckCalculator, DeckService, EventCalculator, EventDeckRecommend, LiveCalculator, LiveType, MusicRecommend };
|