diff --git a/components/moritani-assassinate.tsx b/components/moritani-assassinate.tsx index 0f1afcbe..d03dd332 100644 --- a/components/moritani-assassinate.tsx +++ b/components/moritani-assassinate.tsx @@ -17,6 +17,22 @@ export function MoritaniAssassinate({ 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 ( @@ -30,9 +46,9 @@ export function MoritaniAssassinate({ 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'; - const selectedLeader = card && game.allLeaders.find((leader) => leader.id === card.card); return (

Assassinate Leaders

@@ -43,7 +59,10 @@ export function MoritaniAssassinate({

This advantage is available once against each faction. It cannot be canceled - with Karama. A dead target remains a legal choice, but yields no spice. + 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 ? ( @@ -54,31 +73,32 @@ export function MoritaniAssassinate({ aria-label="Traitor Card to reveal" className="min-h-11 w-full rounded border border-[#65644b] bg-[#171b17] px-3 py-2" value={card?.card ?? ''} - disabled={blocked} - onChange={(event) => setSelected(event.currentTarget.value)} + disabled={revealBlocked} + onChange={(event) => onSelect(event.currentTarget.value)} > {pending.cards.map((candidate) => ( ))} {card && (
-

{card.name} · {card.dead ? '0 spice; target already dead' : `${card.bounty} spice bounty`}

-

Printed leader strength: {selectedLeader?.strength ?? 'unknown'}

+

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

+

Printed leader strength: {card.potentialBounty}

)} @@ -87,6 +107,7 @@ export function MoritaniAssassinate({

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

)}