feat : update UI
This commit is contained in:
@@ -104,6 +104,8 @@ export async function syncStygianArchive() {
|
||||
hp: String(boss.hp),
|
||||
description: boss.description,
|
||||
mechanics: boss.mechanics,
|
||||
recommendedMechanics: boss.recommendedMechanics,
|
||||
recommendedMechanicTypes: boss.recommendedMechanicTypes,
|
||||
imageKey: imageKeyByName.get(boss.imageName)!,
|
||||
}).onConflictDoUpdate({
|
||||
target: [stygianBosses.scheduleId, stygianBosses.level, stygianBosses.position],
|
||||
@@ -113,6 +115,8 @@ export async function syncStygianArchive() {
|
||||
hp: String(boss.hp),
|
||||
description: boss.description,
|
||||
mechanics: boss.mechanics,
|
||||
recommendedMechanics: boss.recommendedMechanics,
|
||||
recommendedMechanicTypes: boss.recommendedMechanicTypes,
|
||||
imageKey: imageKeyByName.get(boss.imageName)!,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -19,6 +19,8 @@ function level(monsterLevel: number) {
|
||||
enMonsterSpecialDesc: `Description ${index}`,
|
||||
enMonsterSpecialMechanicName: ["Mechanic", "", "Missing description"],
|
||||
enLevelMaxDescription: ["Do the thing", "Ignored", ""],
|
||||
enRecommendedLevelMechanic: ["{SPRITE_PRESET#11003} characters", "", " {SPRITE_PRESET#11002} characters "],
|
||||
tagType: ["Advantage", "None", "Disadvantage"],
|
||||
})),
|
||||
};
|
||||
}
|
||||
@@ -41,6 +43,8 @@ describe("Stygian Lunaris parsing", () => {
|
||||
name: "Boss 0",
|
||||
hp: 1234.56,
|
||||
mechanics: [{ name: "Mechanic", description: "Do the thing" }],
|
||||
recommendedMechanics: ["{SPRITE_PRESET#11003} characters", "", "{SPRITE_PRESET#11002} characters"],
|
||||
recommendedMechanicTypes: ["Advantage", "None", "Disadvantage"],
|
||||
imageName: "UI_Img_LeyLineChallenge_Boss_0",
|
||||
});
|
||||
});
|
||||
|
||||
@@ -11,6 +11,8 @@ const levelConfigSchema = z.object({
|
||||
enMonsterSpecialDesc: z.string().default(""),
|
||||
enMonsterSpecialMechanicName: z.array(z.string()),
|
||||
enLevelMaxDescription: z.array(z.string()),
|
||||
enRecommendedLevelMechanic: z.array(z.string()).default([]),
|
||||
tagType: z.array(z.enum(["Advantage", "Disadvantage", "None"])).default([]),
|
||||
});
|
||||
|
||||
export const lunarisStygianScheduleSchema = z.object({
|
||||
@@ -88,6 +90,8 @@ export function selectedStygianBosses(value: z.infer<typeof lunarisStygianSchedu
|
||||
hp: boss.monsterStats.hp,
|
||||
description: boss.enMonsterSpecialDesc,
|
||||
imageName: stygianImageName(boss.specialMonsterIcon),
|
||||
recommendedMechanics: boss.enRecommendedLevelMechanic.map((entry) => entry.trim()),
|
||||
recommendedMechanicTypes: boss.tagType,
|
||||
mechanics: boss.enMonsterSpecialMechanicName.flatMap((name, index) => {
|
||||
const description = boss.enLevelMaxDescription[index]?.trim();
|
||||
return name.trim() && description ? [{ name: name.trim(), description }] : [];
|
||||
|
||||
Reference in New Issue
Block a user