'use client'; import { ArrowRight } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { HelpTip } from '@/components/help-tip'; import type { Action, GameView } from '@/game/engine'; export function AtreidesFullPlan({ game, act, busy, }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { const offer = game.atreidesFullPlan; const me = game.players.find((player) => player.id === game.me); const battle = game.battle; if (!offer || game.status !== 'playing' || !game.advanced || game.phase !== 6 || !battle || me?.faction !== 'atreides') return null; const ownOffer = game.decision?.kind === 'fullPlanOffer' && game.decision.player === game.me; const priorityPending = !!game.response || !!game.phaseOpening || (!!game.decision && !ownOffer) || !!game.truthtrance || !!game.nexusTraitors?.pending; const blocked = offer.blocked || (battle.revealed ? 'The Battle Plans have already been revealed.' : priorityPending ? 'Finish the current response, decision or preparation before inspecting a full plan.' : null); const disabled = busy || !!blocked; const ownSealed = battle.submitted.includes(game.me); return (

Inspect a full Battle Plan

Spend your once-per-game special Karama after battle preparation and before public plan revelation, including when zero or one plan is sealed. If the chosen combatant has not sealed, they commit first; only you receive the inspection. Existing sealed plans cannot change.

{battle.submitted.length} of 2 plans sealed. Leaving this power unused now keeps the opportunity open until public revelation. Battle plan submission continues normally.

{ownSealed && (

Your original sealed plan stays fixed. Plans reveal as soon as the other combatant seals; this power does not unlock either plan.

)} {!!battle.noFieldPlayers.length && (

Provisional power distinction: special Karama reads the complete committed No-Field plan, including dial and support. Ordinary Prescience still cannot request its dial. This private read does not reveal or materialize the marker before both plans seal.

)} {blocked &&

{blocked}

} {!offer.cards.length && (

No spendable Karama is currently available for this special power.

)} {!offer.targets.length && (

No combatant is currently available for full-plan inspection.

)}
{offer.cards.flatMap((card) => offer.targets.map((target) => { const name = game.players.find((player) => player.id === target)?.name ?? 'the selected combatant'; return ( ); }))}
); }