'use client'; import { useState } from 'react'; import { Button } from '@/components/ui/button'; import { HelpTip } from './help-tip'; import { CardInspector } from './card-inspector'; import type { Action, GameView } from '@/game/engine'; export function IxTechnology({ game: g, act, busy, }: { game: GameView; act: (a: Action) => void; busy: boolean; }) { const kind = g.decision?.kind; const me = g.players.find((p) => p.id === g.me)!; const [position, setPosition] = useState('bottom'); const cards = kind === 'ixSetup' ? g.ixTechnology?.setup : kind === 'ixAuction' ? g.ixTechnology?.pool : me.hand; if (kind === 'ixAllyCard') return ( <>
You purchased{' '}
{g.ixPurchased?.name ?? 'a card that is no longer in your hand'}
. Your Ixian alliance lets you keep it or discard it for the top card
of the deck. The replacement stays private.{' '}
{kind === 'ixSetup'
? 'Choose your starting card. The remaining cards are shuffled and dealt privately, one to each other faction; Harkonnen then draws its extra card.'
: kind === 'ixAuction'
? 'Privately choose one card to return to the deck. The remaining pool will be shuffled for auction.'
: 'Exchange one card from your hand for the upcoming card, before Atreides looks. You commit your offered card before learning what you receive. This advantage can be attempted once this round.'}{' '}