Implement Homeworld mechanics through Caladan reinforcement checkpoint

Connect typed Homeworld custody, transport, battle, income, revival and Caladan reinforcement flows with private multiplayer recovery and controls. Preserve the optimized test workflow and keep unfinished rules modes gated. Verified with 3682 offline tests, typecheck, lint, production build and 40 HTTP tests; existing saved games remain unchanged.
This commit is contained in:
Quintine committed 2026-09-10 08:12:26 +10:00
1 parent 3be49512f7
commit 28ba1618ba
266 files changed
+47680 -16851

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import { homeworldForceGroups, type HomeworldCustody, type HomeworldCustodyContext } from './homeworld-custody';
/** E3 alliance restriction uses present foreign forces, independently of any
* saved turn entitlement to an occupied card's benefits. */
export function homeworldAllianceBlock(
context: HomeworldCustodyContext,
custody: HomeworldCustody,
first: string,
second: string,
): string | null {
const occupied = homeworldForceGroups(context, custody).some((world) => {
const visitor = world.native === first ? second : world.native === second ? first : null;
const forces = visitor ? world.forces[visitor] : undefined;
return !!forces && forces.normal + forces.elite > 0;
});
return occupied ? 'An alliance cannot form while either faction has forces on the other’s Homeworld.' : null;
}