Prototype Emperor Nexus shortage handling

This commit is contained in:
Quintine committed 2026-10-27 16:57:12 +11:00
1 parent b620cea873
commit e5c7e338e8
31 files changed
+1057 -95

No files matched your search

+16 -7
View File
@@ -8,27 +8,35 @@ type Props = { game: GameView; act: (action: Action) => void; busy: boolean };
export function NexusSardaukar({ game, act, busy }: Props) {
const state = game.nexusSardaukar;
if (!state) return null;
const count = state.shortCount ?? 5;
const countText = count === 5 ? 'five' : String(count);
const shortage = count < 5 && <p className="notice">
Provisional shortage policy: use all {count} available ordinary force{count === 1 ? '' : 's'}.
This interpretation is not publisher clarification.
</p>;
if (state.pending)
return (
<section aria-label="Emperor Nexus response" className="notice">
<p>
{game.players.find((p) => p.id === state.pending!.owner)?.name ??
'Emperor'}{' '}
declared Cunning. Karama may cancel the entire enhancement before the
five counters count as Sardaukar.
declared Cunning. Karama may cancel the entire enhancement before the{' '}
{countText} counter{count === 1 ? '' : 's'} count{count === 1 ? 's' : ''} as Sardaukar.
</p>
{shortage}
</section>
);
if (state.active)
return (
<section aria-label="Emperor Nexus active" className="notice">
<p>
Cunning declared five ordinary Emperor counters as Sardaukar for this
Cunning declared {countText} ordinary Emperor counter{count === 1 ? '' : 's'} as Sardaukar for this
battle. An own-Homeworld reserve fee can reduce that group;
the selected plan shows the remaining combat pool. These counters
retain their ordinary physical identity and go to the ordinary Tanks
when lost.
</p>
{shortage}
</section>
);
const offer = state.offer;
@@ -41,15 +49,16 @@ export function NexusSardaukar({ game, act, busy }: Props) {
>
<h3>Emperor Nexus · Cunning</h3>
<p>
Count five of your ordinary forces as Sardaukar for this battle. Use
Count {countText} of your ordinary forces as Sardaukar for this battle. Use
this before submitting your plan, with no actual Sardaukar in the
battle.
</p>
<p className="fine">
This spends your Nexus card once. Karama may cancel the enhancement. The
five counters keep their ordinary physical identity, including when
This spends your Nexus card once. Karama may cancel the enhancement. The{' '}
{countText} counter{count === 1 ? '' : 's'} keep{count === 1 ? 's its' : ' their'} ordinary physical identity, including when
lost.
</p>
{shortage}
{offer.blocked && <p className="notice">{offer.blocked}</p>}
<Button
className="game-action min-h-11 whitespace-normal"
@@ -58,7 +67,7 @@ export function NexusSardaukar({ game, act, busy }: Props) {
if (!busy && action) act(action);
}}
>
Use five forces as Sardaukar
Use {countText} force{count === 1 ? '' : 's'} as Sardaukar
</Button>
</section>
);