'use client'; import { useState } from 'react'; import type { Action, GameView } from '@/game/engine'; import { faction } from '@/game/catalog'; import { territory } from '@/game/board'; import { Button } from '@/components/ui/button'; import { LeaderInspector } from './leader-inspector'; export function MoritaniAssassinate({ game, act, busy, }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { const [selected, setSelected] = useState(''); return ; } export function MoritaniAssassinateChoice({ game, act, busy, selected, onSelect, }: { game: GameView; act: (action: Action) => void; busy: boolean; selected: string; onSelect: (card: string) => void; }) { const offer = game.moritaniAssassinate; const decision = game.decision; if ( !offer?.pending || decision?.kind !== 'moritaniAssassinate' || decision.player !== game.me || decision.event !== offer.pending.event || offer.owner !== game.me ) return null; const pending = offer.pending; const card = pending.cards.find((candidate) => candidate.card === selected) ?? pending.cards[0]; const blocked = busy || !!game.response || !!game.truthtrance; const revealBlocked = blocked || !!pending.blocked; const opponent = game.players.find((player) => player.id === pending.opponent); const factionName = opponent ? faction(opponent.faction).name : 'the opposing faction'; return (

Assassinate Leaders

After losing this battle, you may reveal one Traitor Card for {factionName}, naming a different opposing leader. The physical card is revealed publicly; it is replaced automatically during Mentat Pause.

This advantage is available once against each faction. It cannot be canceled with Karama. The potential bounty is the leader’s printed strength and is awarded only if the target is alive. An already-dead target remains a legal choice and awards no spice. Revealing the physical Traitor Card makes the actual outcome public.

{pending.blocked &&

{pending.blocked}

} {pending.cards.length > 0 ? ( <> {card && (

{card.name} · {card.potentialBounty} spice potential bounty

Printed leader strength: {card.potentialBounty}

)} ) : (

No eligible opposing-faction Traitor Card is available for this advantage.

)}
); } export function MoritaniAssassinateHistory({ game }: { game: GameView }) { const history = game.moritaniAssassinate?.history ?? []; if (!history.length) return null; return (

Assassinate Leaders revealed cards

These physical Traitor Cards were revealed publicly. A replaced card is set aside face up; replacement happens during Mentat Pause.

{history.map((entry) => { const leader = game.allLeaders.find((candidate) => candidate.id === entry.card); const leaderName = leader?.name ?? entry.card; const factionName = faction(entry.faction).name; return (

{entry.stage === 'replaced' ? 'Set aside face up · replaced' : 'Revealed · awaiting replacement'}

{leaderName}

{factionName} · {territory(entry.territory).name} · {entry.bounty} spice bounty · Turn {entry.turn}

); })}
); }