'use client'; import { useState } from 'react'; import type { Action, GameView } from '@/game/engine'; import { caladanReinforcementCanAct, caladanReinforcementChoice, } from '@/game/caladan-reinforcement-options'; import { Button } from './ui/button'; type Props = { game: GameView; act: (action: Action) => void; busy: boolean }; export function CaladanReinforcement({ game, act, busy }: Props) { if ( !game.caladanReinforcement || game.caladanReinforcement.player !== game.me || game.decision?.kind !== 'caladanReinforcement' || game.decision.player !== game.me ) return null; return ( ); } function ReinforcementChoice({ game, act, busy }: Props) { const offer = game.caladanReinforcement!; const [destination, setDestination] = useState( offer.destinations.find((target) => !target.blocked)?.id ?? '', ); const canAct = caladanReinforcementCanAct(game); const choice = caladanReinforcementChoice(game, destination); return (

Add one reserve force at the battle location, or leave it in reserves.

Provisional order: this optional force joins the original victorious army before any later Face Dance. If replacement occurs, it returns with the surviving army and counts toward the current replacement limit. This does not create another victory or grant another Caladan reinforcement.

{choice.blocked && (

{choice.blocked}

)}
); }