Implement Ix High paid Cyborg revival bonus

This commit is contained in:
Quintine committed 2026-10-25 19:39:01 +11:00
1 parent 86608f7ea9
commit 052737d0f9
18 files changed
+929 -12

No files matched your search

+14
View File
@@ -165,6 +165,7 @@ import {
import { IxTechnology } from './ix-technology';
import { MobileStronghold } from './mobile-stronghold';
import { IxSubstitution } from './ix-substitution';
import { IxHomeworldRevivalBonus } from './ix-homeworld-revival';
import { controlsLeader } from '@/game/leader-control';
import { leaderStrengthLabel, harvesterAvailable } from '@/game/cards';
import { RevivalCommerce } from './revival-commerce';
@@ -4435,6 +4436,19 @@ export function GameTable({
</span>
</label>
)}
{me.faction === 'ixians' && (
<IxHomeworldRevivalBonus
enabled={g.revival.ixSuboidBonusEnabled}
blocked={g.revival.freeBlocked}
amount={amount}
elite={eliteAmount}
free={Math.min(amount, g.revival.freeRemaining)}
freeElite={freeCyborgFirst
? Math.min(amount, g.revival.freeRemaining, eliteAmount)
: Math.max(0, Math.min(amount, g.revival.freeRemaining) - (amount - eliteAmount))}
normalTanks={me.tanks - (me.elites?.tanks ?? 0)}
/>
)}
{me.faction === 'emperor' &&
me.ally &&
(() => {
+32
View File
@@ -0,0 +1,32 @@
import { quoteIxSuboidBonus } from '@/game/ix-homeworld-revival';
/** The ordinary revival controls own selection and payment. This persistent
* quote explains the automatic physical grant without adding another choice. */
export function IxHomeworldRevivalBonus(props: {
enabled: boolean;
blocked?: boolean;
amount: number;
elite: number;
free: number;
freeElite: number;
normalTanks: number;
}) {
if (!props.enabled) return null;
if (props.blocked) return <p className="notice" aria-live="polite">
La La La prevents the free Ix HIGH Suboid bonus on new requests this phase.
{' '}Paid Cyborg revival remains available.
</p>;
let bonus: number;
try { bonus = quoteIxSuboidBonus(props); }
catch {
return <p className="fine" aria-live="polite">
Ix HIGH adds up to two physical Suboids from Tanks per paid Cyborg.
Select an available revival group to see its bonus.
</p>;
}
return <p className="notice" aria-live="polite">
Ix HIGH: this selection also returns {bonus} Suboid{bonus === 1 ? '' : 's'} for free.
{' '}These additional physical forces do not use normal revival allowance
or its free quota. Available Suboids in Tanks limit the bonus.
</p>;
}