'use client'; import { useId } from 'react'; import type { Action, GameView } from '@/game/engine'; import { Button } from './ui/button'; import { CardInspector, CardRules } from './card-inspector'; const fullHandPolicy = 'Provisional full-hand exchange: retrieval and the played Box discard settle atomically, leaving your final hand at its limit. The printed intermediate-capacity timing remains unresolved.'; const shipmentPricePolicy = 'Provisional refund rule: the purchased shipping price, the player who bought it and its shipment beneficiary stay unchanged. Recovering its original card cost prevents a refund if the Guild later stops that shipment with special Karama, even after that card is discarded again. Taking another card leaves any still-unclaimed cost under its usual refund rule.'; type BoxProps = { game: GameView; act: (action: Action) => void; busy: boolean; }; /** Before payment this renders only the owned Box, never discard candidates. */ export function NullentropyBox({ game, act, busy }: BoxProps) { const id = useId(); const box = game.nullentropy; if (!box) return null; if (box.search) return (

Your Nullentropy Box search is paid. Complete the private card choice in the decision panel above. {box.fullHandExchange && {fullHandPolicy}} {game.karamaShipping && {shipmentPricePolicy}}

); return (
Nullentropy Box: paid discard search

Pay 2 spice to the bank to privately search the Treachery discard pile. Choose one card other than any Nullentropy Box. The remaining pile is shuffled, then your played Box is discarded on top.

Payment begins the search. There is no free cancellation after seeing the cards. If only one card is eligible, the server takes it automatically.

{game.karamaShipping &&

{shipmentPricePolicy}

} {box.fullHandExchange &&

{fullHandPolicy}

} {box.blocked && (

{box.blocked}

)}
); } /** Only the paid, entitled projection supplies these temporary discard faces. */ export function NullentropySearch({ game, act, busy }: BoxProps) { const search = game.nullentropy?.search; if ( game.decision?.kind !== 'nullentropy' || game.decision.player !== game.me || !search ) return null; return (

You have paid 2 spice. Choose one card for your hand. This finishes the search and discards your Box on top of the shuffled remainder.

These discard cards are visible only to you during this paid search. Inspection does not select a card.

{game.karamaShipping &&

{shipmentPricePolicy}

} {game.nullentropy?.fullHandExchange &&

{fullHandPolicy}

}
{search.cards.map((card) => (

{card.name}

))}
); }