'use client'; import type { Action, GameView } from '@/game/engine'; import { nexusSardaukarAction } from '@/game/nexus-sardaukar-options'; import { Button } from './ui/button'; type Props = { game: GameView; act: (action: Action) => void; busy: boolean }; export function NexusSardaukar({ game, act, busy }: Props) { const state = game.nexusSardaukar; if (!state) return null; const count = state.shortCount ?? 5; const countText = count === 5 ? 'five' : String(count); const shortage = count < 5 &&

Provisional shortage policy: use all {count} available ordinary force{count === 1 ? '' : 's'}. This interpretation is not publisher clarification.

; if (state.pending) return (

{game.players.find((p) => p.id === state.pending!.owner)?.name ?? 'Emperor'}{' '} declared Cunning. Karama may cancel the entire enhancement before the{' '} {countText} counter{count === 1 ? '' : 's'} count{count === 1 ? 's' : ''} as Sardaukar.

{shortage}
); if (state.active) return (

Cunning declared {countText} ordinary Emperor counter{count === 1 ? '' : 's'} as Sardaukar for this battle. An own-Homeworld reserve fee can reduce that group; the selected plan shows the remaining combat pool. These counters retain their ordinary physical identity and go to the ordinary Tanks when lost.

{shortage}
); const offer = state.offer; if (!offer) return null; const action = nexusSardaukarAction(game, offer.event); return (

Emperor Nexus ยท Cunning

Count {countText} of your ordinary forces as Sardaukar for this battle. Use this before submitting your plan, with no actual Sardaukar in the battle.

This spends your Nexus card once. Karama may cancel the enhancement. The{' '} {countText} counter{count === 1 ? '' : 's'} keep{count === 1 ? 's its' : ' their'} ordinary physical identity, including when lost.

{shortage} {offer.blocked &&

{offer.blocked}

}
); }