diff --git a/components/homeworld-shipment.tsx b/components/homeworld-shipment.tsx index 7238edc0..32b4bd4d 100644 --- a/components/homeworld-shipment.tsx +++ b/components/homeworld-shipment.tsx @@ -12,8 +12,7 @@ import { import { Button } from './ui/button'; import { Input } from './ui/input'; -/** This private control is separate from physical-source shipment: the marker - * costs one but does not withdraw a reserve counter until it is revealed. */ +/** The concealed marker does not withdraw a reserve counter until revealed. */ export function HomeworldNoFieldShipment({ game, act, busy }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { @@ -22,6 +21,7 @@ export function HomeworldNoFieldShipment({ game, act, busy }: { const [selectedDestination, setSelectedDestination] = useState(''); const [selectedToken, setSelectedToken] = useState(''); const [allyPayment, setAllyPayment] = useState(0); + const [forces, setForces] = useState({ normal: 0, elite: 0 }); if (!me || me.faction !== 'richese' || info?.owner !== me.id || !info.private) return null; const deployed = info.private.deployed; const source = deployed && 'homeworld' in deployed.location ? deployed.location.homeworld : undefined; @@ -30,13 +30,16 @@ export function HomeworldNoFieldShipment({ game, act, busy }: { const destination = targets.find(world => world.id === selectedDestination) ?? targets[0]; const tokens = info.private.tokens.filter(token => source ? token.id === deployed?.tokenId : token.id !== info.private!.lastShipped); const token = tokens.find(candidate => candidate.id === selectedToken) ?? tokens[0]; - const quote = richeseHomeworldMarkerChoice(game, destination?.id ?? '', token?.id ?? '', allyPayment, source); + const pool = source ? game.homeworlds?.worlds?.find(world => world.id === source)?.forces[me.id] : undefined; + const quote = richeseHomeworldMarkerChoice(game, destination?.id ?? '', token?.id ?? '', allyPayment, source, + source ? forces : undefined); return
Ship a concealed No-Field

Provisional Homeworld rule: ship one concealed marker {source ? `from ${homeworldName(game, source)}` : 'from your supply'} to - another non-allied Homeworld for one spice. Its value stays private and its physical forces - remain in your reserves until the marker is revealed. This uses your normal shipment.

+ another non-allied Homeworld. Its value stays private and its represented forces + remain in your reserves until the marker is revealed. This uses your normal shipment. + {source && ' Physical forces already on the same Homeworld may accompany it.'}

+ {source && pool &&
+ Accompanying forces from {homeworldName(game, source)} + {(['normal', 'elite'] as const).filter(kind => kind === 'normal' || pool.elite > 0).map(kind => + )} +
} {me.ally && } - One marker · one spice total · you pay {quote.ownPayment}, ally pays {quote.allyPayment}. + {quote.amount} total (including one marker) · {quote.cost === 1 ? 'one' : quote.cost} spice total · you pay {quote.ownPayment}, ally pays {quote.allyPayment}. {quote.blocked && ` ${quote.blocked}`}