import { Coins, Megaphone, RotateCcw, ShieldCheck, Sparkles, Tv, UserMinus, Users, type LucideIcon } from "lucide-react"; import { Avatar } from "../art/Avatar.tsx"; import { PARTY_RESOURCES, originBonusText, partyKind, type Background } from "@election2026/protocol"; import { partyColor } from "../parties.ts"; import type { Ability } from "../career/term/types.ts"; import { ABILITY_IDS, ABILITY_LABELS, MAX_LEVEL, toNext, type CareerState } from "./careerRules.ts"; /** 五項能力的圖示與顏色(和標題畫面選單同一組顏色) */ const ABILITY_LOOK: Record = { eloquence: { Icon: Megaphone, color: "#d61f2c" }, organization: { Icon: Users, color: "#1f8a4c" }, media: { Icon: Tv, color: "#2f6fd1" }, finance: { Icon: Coins, color: "#c99400" }, integrity: { Icon: ShieldCheck, color: "#7a5cc4" }, }; /** 政黨色(tokens.css 的政黨槽位色;三大黨以外是灰色,見 parties.ts) */ export const partyTone = partyColor; /** * 角色卡(18 第 44、47 項):像遊戲的角色面板——頭像名牌、等級徽章、經驗條、技能點、五項能力。 * 有技能點時能力旁的+會亮;加過的點可以重新分配;最下面可以換人物(結束這段生涯)。 */ export function CareerSheet({ career, effects, onPlus, onReset, onQuit, }: { career: CareerState; effects: Map; onPlus: (a: Ability) => void; onReset: () => void; onQuit: () => void; }) { const need = toNext(career.level); const spent = ABILITY_IDS.reduce((a, id) => a + career.abilities[id] - career.base[id], 0); const c = career.character; return ( ); } /** 出身和黨的資源(不能自己點的加成,18 第 53 項):角色卡和捏人物都用這個 */ export function OriginPerks({ background, party }: { background: Background; party: string | null }) { const res = PARTY_RESOURCES[partyKind(party)]; return (
出身・{background}
{originBonusText(background)}
黨的資源・{res.label}
{res.perks.join("、")} {res.costs.length > 0 && 代價:{res.costs.join("、")}}
); }