'use client'; import type { Action, GameView } from '@/game/engine'; import { nexusCardMode } from '@/game/nexus-cards'; import { NexusCardFace } from './nexus-cards'; import { Button } from './ui/button'; export function NexusIxianBetrayal({ game, act, busy }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { const reaction = game.nexusIxianBetrayalReaction; if (!reaction) return null; const own = game.players.find((player) => player.id === game.me); const provider = game.players.find((player) => player.id === reaction.provider); const canRespond = !!reaction.event && reaction.canPass && !reaction.hasPassed; const canUse = canRespond && reaction.canUse && !reaction.blocked; const priorityBlocked = game.automaticContinuationPending || !!game.truthtrance || !!game.response || !!game.decision || !!game.phaseOpening || !!game.nexusCards?.waiting.length || !!game.nexusTraitors?.pending; const disabled = busy || game.status !== 'playing' || game.phase !== 3 || priorityBlocked || !!game.roomControl?.paused || !!game.roomControl?.closed || !!own?.autopilot; const ownMode = game.nexusCards?.card === 'ixians' && own ? nexusCardMode('ixians', own.faction, game.players.map((player) => player.faction)) : undefined; const advantage = reaction.kind === 'bidding' ? 'Bidding' : 'Technology'; return (

Native Ixian advantage acknowledgement · {advantage}

{provider?.name ?? 'The Ixian player'} has a pending native {advantage} attempt. {reaction.kind === 'bidding' ? ' The extra-card draw and inspection have not happened.' : ' The declared exchange has not happened.'}

Every publicly possible unallied responder acknowledges this boundary, regardless of their secret Nexus identity. After all acknowledgements, the original advantage continues once. Preventing it closes only this attempt, not the whole phase. The native Karama response finishes first; this acknowledgement is not another Karama counter window.

{game.nexusCards?.card === 'ixians' && <> {ownMode === 'betrayal' &&

Spend your own Ixian Nexus to prevent this one native {advantage} advantage. {' '}Betrayal timing and preview limits

} } {!canRespond ? (

{reaction.hasPassed ? 'You have passed. Waiting for the remaining acknowledgements.' : 'Waiting for the required acknowledgements.'}

) : <> {reaction.blocked &&

{reaction.blocked}

} {canUse && } }
); }