Files
ChronicleOfTheImmortalClan/src/renderer/game/data/elements.ts
T
thzxx adb22f0558 v0.1.0: 仙途家族志 · Chronicle of the Immortal Clan
家族模拟器首版:修仙/经营/战斗/外交/叙事全套系统
- Electron + React + TS + MetonaSqlark(aria+OPFS)
- 水墨中国风 UI
- 引擎种子随机、确定性可回放
- 19 项单元测试、端到端冒烟验证
2026-08-23 00:04:16 +08:00

28 lines
1.1 KiB
TypeScript

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<number, RootGradeDef> = {
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})`
}