Allow fresh Advanced native No-Field placement
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
9ca68c9ff8
commit
26d45ecf25
13 files changed
+201
-21
No files matched your search
@@ -26,7 +26,7 @@ export function HomeworldNoFieldShipment({ game, act, busy }: {
|
||||
const deployed = info.private.deployed;
|
||||
const source = deployed && 'homeworld' in deployed.location ? deployed.location.homeworld : undefined;
|
||||
const targets = (game.homeworlds?.worlds ?? []).filter(world =>
|
||||
(world.native !== me.id || !!source && game.advanced) &&
|
||||
(world.native !== me.id || game.advanced) &&
|
||||
world.native !== me.ally && world.id !== source);
|
||||
const destination = targets.find(world => world.id === selectedDestination) ??
|
||||
targets.find(world => world.native !== me.id) ?? targets[0];
|
||||
@@ -34,19 +34,20 @@ export function HomeworldNoFieldShipment({ game, act, busy }: {
|
||||
const token = tokens.find(candidate => candidate.id === selectedToken) ?? tokens[0];
|
||||
const pool = source ? game.homeworlds?.worlds?.find(world => world.id === source)?.forces[me.id] :
|
||||
{ normal: me.reserves - (me.elites?.reserves ?? 0), elite: me.elites?.reserves ?? 0 };
|
||||
const nativeFresh = !source && destination?.native === me.id;
|
||||
const quote = richeseHomeworldMarkerChoice(game, destination?.id ?? '', token?.id ?? '', allyPayment, source,
|
||||
forces);
|
||||
nativeFresh ? { normal: 0, elite: 0 } : forces);
|
||||
return <fieldset disabled={busy || !!me.autopilot || !!game.homeworldShipment?.blocked}
|
||||
className="space-y-3 pt-3">
|
||||
<legend>Ship a concealed No-Field</legend>
|
||||
<p className="fine">Provisional Homeworld rule: ship one concealed marker {source ? `from ${homeworldName(game, source)}` : 'from your supply'} to
|
||||
another non-allied Homeworld. Its value stays private and its represented forces
|
||||
an eligible non-allied Homeworld. Its value stays private and its represented forces
|
||||
remain in your reserves until the marker is revealed. On your own Homeworld,
|
||||
the represented forces are already in those reserves and are not added again.
|
||||
This uses your normal shipment. Physical forces from the same source may accompany it.</p>
|
||||
This uses your normal shipment. Physical forces from the same source may accompany it when moving to another World.</p>
|
||||
<label className="block space-y-1">Destination Homeworld for No-Field
|
||||
<select aria-label="No-Field destination Homeworld" value={destination?.id ?? ''}
|
||||
onChange={event => setSelectedDestination(event.target.value)}>
|
||||
onChange={event => { setSelectedDestination(event.target.value); setForces({ normal: 0, elite: 0 }); }}>
|
||||
{!targets.length && <option value="">No eligible destination</option>}
|
||||
{targets.map(world => <option key={world.id} value={world.id}>
|
||||
{homeworldName(game, world.id)} · {game.players.find(player => player.id === world.native)?.name}
|
||||
@@ -60,7 +61,8 @@ export function HomeworldNoFieldShipment({ game, act, busy }: {
|
||||
{tokens.map(candidate => <option key={candidate.id} value={candidate.id}>No-Field {candidate.value}</option>)}
|
||||
</select>
|
||||
</label>
|
||||
{pool && <fieldset className="space-y-2">
|
||||
{nativeFresh && <p className="fine">Your physical reserves are already on Richese and cannot accompany this placement.</p>}
|
||||
{pool && !nativeFresh && <fieldset className="space-y-2">
|
||||
<legend>Accompanying forces from {source ? homeworldName(game, source) : 'your reserves'}</legend>
|
||||
{(['normal', 'elite'] as const).filter(kind => kind === 'normal' || pool.elite > 0).map(kind =>
|
||||
<label key={kind} className="block space-y-1">
|
||||
|
||||
Reference in new issue
Block a user