// Choosing a general, as 无名杀's 选将 dialog: the candidates as portrait cards with faction, HP and skills; pick one, // then 确定. The move is the upstream's own (OverlaysLayer): 系统规则 · 选将 with the general's name. import { useState } from 'react'; import { getCharacterMeta } from '../../../src/engine/data/character-meta'; import { getSkillDescription } from '../../../src/engine/skills/lifecycle'; import { displaySkillName } from '../../../src/client/utils/skillDisplay'; import type { ActionMsg } from '../../../src/client/types'; import { portrait, FACTION_KEY } from './art'; import { Hp, Timer } from './Seat'; interface Props { candidates: Array<{ name: string; skills: string[] }>; target: number; mine: boolean; deadline: number | null; totalMs: number; onAction: (a: ActionMsg) => void; } export function CharSelect({ candidates, target, mine, deadline, totalMs, onAction }: Props) { const [pick, setPick] = useState(null); const [sent, setSent] = useState(false); if (sent || !mine) return
等待其他角色选择武将…
; return (
请选择武将
{candidates.map((c) => { const meta = getCharacterMeta(c.name); const fac = meta?.faction ?? '群'; const img = portrait(c.name); return ( ); })}
); }