import { Element } from '../types/domain' export const ELEMENT_LIST: Element[] = ['金', '木', '水', '火', '土'] export const ROOT_GRADE_NAMES = ['伪灵根', '凡品灵根', '玄品灵根', '真品灵根', '天品灵根', '仙品灵根'] export const ROOT_GRADE_COLORS = ['#8a8078', '#9cb27c', '#7fa7c9', '#b08cd9', '#e6b84c', '#e05a5a'] export interface RootGradeDef { name: string expBonus: number drawWeight: number } export const ROOT_GRADES: Record = { 0: { name: '伪灵根', expBonus: 0.5, drawWeight: 14 }, 1: { name: '凡品灵根', expBonus: 0.8, drawWeight: 38 }, 2: { name: '玄品灵根', expBonus: 1.0, drawWeight: 30 }, 3: { name: '真品灵根', expBonus: 1.3, drawWeight: 12 }, 4: { name: '天品灵根', expBonus: 1.7, drawWeight: 5 }, 5: { name: '仙品灵根', expBonus: 2.2, drawWeight: 1.5 } } export function describeRoots(roots: { grade: number; primary: Element; secondary: Element[] }): string { const parts = [roots.primary, ...roots.secondary].join('') return `${ROOT_GRADE_NAMES[roots.grade] ?? '伪灵根'}(${parts})` }