'use client'; import { useState } from 'react'; import type { Action, GameView } from '@/game/engine'; import { FACTIONS } from '@/game/catalog'; import { homeworldCard } from '@/game/homeworld-cards'; import { HomeworldFace } from './homeworld-cards'; import { Button } from './ui/button'; type Props = { game: GameView; act: (action: Action) => void; busy: boolean }; type Offer = NonNullable; export function HomeworldOccupiedBonus({ game, act, busy }: Props) { const offer = game.homeworldOccupiedBonus; if (!offer) return null; const authorized = game.decision?.kind === 'homeworldOccupiedBonus' && game.decision.player === game.me && game.decision.event === offer.event && offer.owner === game.me; if (!authorized && !offer.blocked) return null; return ; } function BonusChoice({ offer, act, busy }: Props & { offer: Offer }) { const [recipient, setRecipient] = useState(offer.owner); const selected = offer.recipients.find((player) => player.player === recipient) ?? offer.recipients[0]; return (

Giedi Prime · occupied purchase bonus

{offer.ownerName} chooses who receives one real treachery card from the original purchase bonus. Only the server-listed eligible recipients can receive it. The card stays private to its recipient.

This printed Homeworld effect is separate from the ordinary cancelable Harkonnen advantage and cannot be canceled by Karama. This is one card, not one card per recipient.

Development preview · Advanced occupation benefits are retained until your last occupying force leaves. Basic lifecycle and unresolved competing-owner cases remain guarded. Not complete or certified Homeworld rules.

Inspect Giedi Prime source card
{offer.blocked ? {offer.blocked} : !selected ? (

No eligible recipient is available.

) : (
{ event.preventDefault(); if (!busy) act({ type: 'decision', event: offer.event, recipient: selected.player }); }}>
)}
); }