'use client'; import type { GameView } from '@/game/engine'; import { HelpTip } from './help-tip'; import { faction } from '@/game/catalog'; import { leaderStrengthLabel } from '@/game/cards'; import { BattleComponentInspection } from './battle-component-inspection'; export function PrivateBattlePlan({ game }: { game: GameView }) { const insight = game.battle?.fullPlanInsight; if ( !insight || game.battle?.revealed || game.battle?.fullPlan?.owner !== game.me ) return null; const leader = game.allLeaders.find((l) => l.id === insight.plan.leader); const name = (id: string | null) => id ? (insight.cards.find((c) => c.id === id)?.name ?? game.allLeaders.find((l) => l.id === id)?.name ?? id) : 'None'; return (
Atreides · private inspection

{game.players.find((p) => p.id === insight.target)?.name}’s committed plan

Only you receive this inspection, including when you are helping an ally. It stays available until both plans are publicly revealed. The other combatant can prepare and seal their plan without an inspection confirmation.

Dial
{insight.plan.dial}
Spice support
{insight.plan.support}
Spice Banker commitment
{insight.plan.bankerSpice ?? 0}
Leader
{name(insight.plan.leader)}
Weapon
{name(insight.plan.weapon)}
Defense
{name(insight.plan.defense)}
Kwisatz Haderach
{insight.plan.kwisatz ? 'Included' : 'Not included'}
p.id === insight.target)?.name ?? 'Player' } cards={insight.cards} kwisatz={insight.plan.kwisatz} leader={ leader ? { name: leader.name, factionName: faction(leader.faction).name, strength: leaderStrengthLabel(leader), } : undefined } />
); }