'use client'; import { ArrowRight } from 'lucide-react'; import { Button } from '@/components/ui/button'; import type { Action, GameView } from '@/game/engine'; export function TleilaxuSpecialKarama({ game, act, busy, }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { const offer = game.tleilaxuSpecialKarama; const me = game.players.find((player) => player.id === game.me); if (!offer || game.status !== 'playing' || !game.advanced || game.phase !== 4 || me?.faction !== 'tleilaxu') return null; const ownStop = offer.pending && game.decision?.kind === 'revivalStop' && game.decision.player === game.me; const priorityPending = !!game.response || !!game.phaseOpening || !!game.truthtrance || !!game.nexusTraitors?.pending || (!!game.decision && !ownStop) || (offer.pending && !ownStop); const blocked = offer.blocked || (priorityPending ? 'Finish the current response, decision or phase opening before using this special Karama.' : null); return (

Prevent revival

Spend your once-per-game special Karama to prevent one faction’s force and leader revivals for the rest of this Revival, including returns from Ghola Treachery. You may choose yourself or an ally, even if the chosen faction is ready or has already completed revivals.

Completed returns and payments stay unchanged. This power does not remove returned pieces or refund spice.

Provisional rule: Ghola Treachery is included during the affected Revival, and this prevention expires when the phase ends. It does not stop Ghola outside Revival.

The Emperor’s native special Karama remains protected by the printed immunity of special Karama powers.

{game.homeworlds &&

Provisional Homeworld rule: Low keeps its printed free revival rate. Preventing the return as a whole gives no separate bonus-only return.

} {offer.pending && (

Only the original recipient can be selected during this pending revival.

)} {blocked &&

{blocked}

} {!offer.cards.length && (

No spendable Karama is currently available for this special power.

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

No faction is currently available for this revival-prevention power.

)} {offer.targets.map((target) => { const name = game.players.find((player) => player.id === target.player)?.name ?? 'the selected faction'; const targetReasonId = `tleilaxu-special-karama-${target.player}-unavailable`; const describedBy = [ blocked ? 'tleilaxu-special-karama-unavailable' : undefined, target.blocked ? targetReasonId : undefined, ].filter(Boolean).join(' ') || undefined; const disabled = busy || !!blocked || !!target.blocked; return (
{target.blocked &&

{name}: {target.blocked}

}
{offer.cards.map((card) => ( ))}
); })}
); }