'use client'; import { useState } from 'react'; import { Button } from '@/components/ui/button'; import type { Action, GameView } from '@/game/engine'; export function ChoamCashIn({ game: g, act, busy, }: { game: GameView; act: (a: Action) => void; busy: boolean; }) { const [activation, setActivation] = useState(''); const [selected, setSelected] = useState([]); const cash = g.choamCashIn; if (!cash?.karamas.length) return null; const card = cash.karamas.find((c) => c.id === activation) ?? cash.karamas[0]; const choices = cash.cards.filter((c) => c.id !== card.id); const cards = selected.filter((id) => choices.some((c) => c.id === id)); return (

CHOAM special Karama

Once per game, spend Karama and discard other cards for three spice each. Committed battle cards are excluded. The activating Karama earns no spice.

{choices.map((c) => ( ))}
); }