feat : better ui
This commit is contained in:
@@ -66,7 +66,7 @@ export const artifactSectionSchema = z.strictObject({
|
||||
targets: z.array(z.strictObject({
|
||||
stat: z.enum(targetStatOptions),
|
||||
value: z.string().trim().min(1).max(80),
|
||||
})).max(20),
|
||||
})).max(targetStatOptions.length),
|
||||
talents: z.array(z.strictObject({
|
||||
type: z.enum(["NA", "E", "Q"]),
|
||||
priority: z.number().int().min(1).max(3),
|
||||
|
||||
@@ -42,6 +42,15 @@ export function targetStatIconName(value: string): string | null {
|
||||
: stat.toLowerCase();
|
||||
}
|
||||
|
||||
export function recommendedStatIconName(value: string): string | null {
|
||||
if (value === "CRIT Rate%/CRIT DMG%") return "critrate";
|
||||
if (value === "Healing Bonus%") return "healing-bonus";
|
||||
if (value.endsWith(" DMG%")) return "elemental-bonus";
|
||||
|
||||
const base = value.replace(/%$/, "").toLowerCase();
|
||||
return ["hp", "atk", "def", "em", "er"].includes(base) ? base : null;
|
||||
}
|
||||
|
||||
export function statPriorityColorClass(index: number): string {
|
||||
return index === 0
|
||||
? "text-tier-gold"
|
||||
|
||||
Reference in New Issue
Block a user