'use client'; import { useState } from 'react'; import type { Action, GameView } from '@/game/engine'; import { nexusFremenRevivalAction } from '@/game/nexus-fremen-revival-options'; import { Button } from '@/components/ui/button'; export function NexusFremenRevival({ game, act, busy }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { const [selectedElite, setSelectedElite] = useState(null); const offer = game.nexusFremenRevival; if (!offer || game.phase !== 4 || game.nexusCards?.card !== 'fremen') return null; const options = offer.eliteOptions; const elite = options.length === 1 ? options[0] : selectedElite !== null && options.includes(selectedElite) ? selectedElite : null; const action = elite === null ? null : nexusFremenRevivalAction(game, elite); return (

Fremen Secret Ally

Spend your Fremen Nexus card to return 3 forces from Tanks to reserves for free. This uses your ordinary three-force Revival allowance; the Advanced elite cap still applies.

{offer.blocked &&

{offer.blocked}

} {options.length > 1 && ( )}
); }