feat: implement infinite mode with character selection and scoring; refactor daily character storage logic

This commit is contained in:
2026-03-02 11:23:52 +01:00
parent cf25a96719
commit b245ee984a
5 changed files with 453 additions and 11 deletions

View File

@@ -168,6 +168,17 @@ export async function getDailyModeCharacters(): Promise<CharacterWithRelations[]
return applyCharacterOverrides(characters);
}
export async function getAllCharacters(): Promise<CharacterWithRelations[]> {
const characters = (await db
.select(characterWithRelationsSelect)
.from(character)
.leftJoin(arc, eq(character.arcId, arc.id))
.leftJoin(devilFruit, eq(character.devilFruitId, devilFruit.id))
.all()) as CharacterWithRelations[];
return applyCharacterOverrides(characters);
}
export async function getCharacterById(characterId: string): Promise<CharacterWithRelations | null> {
const [found] = await db
.select(characterWithRelationsSelect)