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

+1 -1
View File
@@ -215,7 +215,7 @@ export function BattlePromises(props: {
{action.type === 'nexusSuboids'
? 'Use Ixian Cunning to give Suboids full strength without spice support'
: action.type === 'nexusSardaukar'
? 'Declare Emperor Cunning to count five ordinary forces as Sardaukar for this battle'
? `Declare Emperor Cunning to count ${g.nexusSardaukar?.shortCount ?? 'five'} ordinary forces as Sardaukar for this battle`
: action.mode === 'special'
? `Spend Karama and discard ${(action.cards as string[]).map(name).join(', ')} to gain ${(action.cards as string[]).length * 3} spice`
: typeof action.leader === 'string'
+8 -2
View File
@@ -77,6 +77,7 @@ export function NexusEmperorSecretAlly({
if (!eligible) return null;
const options = offer.revival.eliteOptions;
const amount = offer.revival.amount ?? 3;
const elite = options.length === 1
? options[0]
: selectedElite !== null && options.includes(selectedElite)
@@ -88,10 +89,15 @@ export function NexusEmperorSecretAlly({
<section className="min-w-0 space-y-3" aria-label="Emperor Secret Ally revival">
<h3 className="font-serif text-xl">Emperor Secret Ally</h3>
<p className="text-base leading-7">
Spend the Emperor Nexus card to request exactly 3 additional forces for free
Spend the Emperor Nexus card to request {amount} additional {amount === 1 ? 'force' : 'forces'} for free
through the normal revival continuation, beyond ordinary force/free allowances.
Native typed caps and prevention still apply; Recruits does not double this grant.
</p>
<p className="notice">
Provisional short-group policy: return exactly 3 when eligible; otherwise return
all 1 or 2 eligible physical forces. This is not publisher clarification.
No eligible forces means the card cannot be spent. This grant revives no leader.
</p>
{offer.revival.blocked && <p className="notice">{offer.revival.blocked}</p>}
{offer.revival.policy && <p className="notice">{offer.revival.policy}</p>}
{options.length > 1 && (
@@ -118,7 +124,7 @@ export function NexusEmperorSecretAlly({
if (!blocked && action) act(action);
}}
>
Revive 3 additional forces{elite === null ? '' : ` · ${elite} elite`}
{amount > 0 ? `Revive ${amount} additional ${amount === 1 ? 'force' : 'forces'}` : 'No eligible forces to revive'}{elite === null ? '' : ` · ${elite} elite`}
</Button>
</section>
);
+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>
);