// The art pack (viewer/art/, built by src/art.py from 无名杀's files): which picture each general and each card of the // upstream engine gets, as data in art.json (general → 无名杀 character id, card → 无名杀 card id). Anything not in it // falls back to a drawn face: the faction's colour and the name for a general, the name for a card. import art from './art.json'; const GENERALS: Record = art.generals; const CARDS: Record = art.cards; export const portrait = (name?: string): string | null => (name && GENERALS[name] ? `art/general/${GENERALS[name]}.webp` : null); export const cardArt = (name?: string): string | null => (name && CARDS[name] ? `art/card/${CARDS[name]}.webp` : null); export const CARD_BACK = 'art/theme/cardback.webp'; /** 魏蜀吴群神 → the class suffix of the faction's frame and badge. */ export const FACTION_KEY: Record = { 魏: 'wei', 蜀: 'shu', 吴: 'wu', 群: 'qun', 神: 'shen' };