| 1 | |
| 2 | |
| 3 | |
| 4 | import art from './art.json'; |
| 5 | |
| 6 | const GENERALS: Record<string, string> = art.generals; |
| 7 | const CARDS: Record<string, string> = art.cards; |
| 8 | |
| 9 | export const portrait = (name?: string): string | null => (name && GENERALS[name] ? `art/general/${GENERALS[name]}.webp` : null); |
| 10 | export const cardArt = (name?: string): string | null => (name && CARDS[name] ? `art/card/${CARDS[name]}.webp` : null); |
| 11 | export const CARD_BACK = 'art/theme/cardback.webp'; |
| 12 | |
| 13 | |
| 14 | export const FACTION_KEY: Record<string, string> = { 魏: 'wei', 蜀: 'shu', 吴: 'wu', 群: 'qun', 神: 'shen' }; |