Prototype Harkonnen Nexus with standalone E3 factions
Verify and publish checkpoint container / container (push) Successful in 14m6s

This commit is contained in:
Quintine committed 2026-11-16 21:03:08 +11:00
1 parent 6a30fdf376
commit 007508185e
14 files changed
+647 -18

No files matched your search

+15 -4
View File
@@ -12968,7 +12968,14 @@ export function initializeHarkonnenNexusBetrayalGameForAudit(state: Game): Game
requireFreshBaseRuntime(state);
return initializeNexusGameForAudit(state);
}
/** Bare Advanced E3 retains its native profile after the reaction is stamped. */
function harkonnenE3NexusBetrayalProfile(g: Game): boolean {
return !!g.advanced && !!byFaction(g, 'harkonnen') && !g.homeworlds &&
!g.techTokens && !g.strongholdCards && !g.discoveryEnabled && !g.discoveries &&
!g.ecazTreachery && !g.leaderSkills && standaloneE3NexusProfile(g);
}
function harkonnenNexusBetrayalModeSupported(g: Game): boolean {
if (harkonnenE3NexusBetrayalProfile(g)) return true;
if (nexusCoreProfile(g)) return !!byFaction(g, 'harkonnen');
return typeof g.advanced === 'boolean' && !!g.nexusCards && g.expansions.length === 0 &&
g.players.length >= 2 && g.players.length <= 6 && !!byFaction(g,'harkonnen') &&
@@ -13086,6 +13093,9 @@ function harkonnenNexusBetrayalIntegrity(g: Game, mentatOpening = false): void {
function offerHarkonnenNexusBetrayal(g: Game, provider: string, response?: ResponseWindow): boolean {
if (!g.nexusHarkonnenBetrayalPreview || getPlayer(g,provider).faction !== 'harkonnen') return false;
const b = g.battle!;
// Occupy can add co-side voters that the current two-sided source cannot bind.
// Retain the original Traitor call until that declaration is supported.
if (b.ecazOccupy && harkonnenE3NexusBetrayalProfile(g)) return false;
const required = nexusRule(() => harkonnenBetrayalResponders(g.nexusCards!.cards!,g.players));
if (!required.length) return false;
requireRule(!b.nexusHarkonnenAllowance && (!response || response.kind === 'harkonnenTraitor'),
@@ -14408,7 +14418,8 @@ function initializeSetupGameForAudit(state: Game, homeworlds: boolean, nexus = f
g.spiceBankerIncomePreview = true;
g.spiceBankerIncome = bankerIncomeRule(() => createBankerIncomeState(bankerIncomeContext(g)));
}
if (nativeNexusReactions && nexusCoreProfile(g)) {
const nativeNexusCore = nexusCoreProfile(g);
if (nativeNexusReactions && (nativeNexusCore || harkonnenE3NexusBetrayalProfile(g))) {
requireRule(g.nexusIxianReplacementPreview === undefined &&
g.nexusIxianReplacementHistory === undefined && g.nexusIxianReplacementCursor === undefined &&
!g.pendingNexusIxianReplacement && !g.pendingNexusIxianSpecialPurchase &&
@@ -14422,13 +14433,13 @@ function initializeSetupGameForAudit(state: Game, homeworlds: boolean, nexus = f
requireRule(g.nexusIxianBetrayalPreview === undefined && g.nexusIxianBetrayalHistory === undefined &&
g.nexusIxianBetrayalCursor === undefined && !g.pendingNexusIxianBetrayal,
'Native Ixian Nexus reactions require original undealt effect state.');
if (!byFaction(g, 'ixians')) {
if (nativeNexusCore && !byFaction(g, 'ixians')) {
g.nexusIxianReplacementPreview = true;
g.pendingNexusIxianReplacement = null;
g.nexusIxianReplacementHistory = [];
g.nexusIxianReplacementCursor = initialIxianReplacementCursor();
}
if (byFaction(g, 'ixians')) {
if (nativeNexusCore && byFaction(g, 'ixians')) {
g.nexusIxianBetrayalPreview = true;
g.pendingNexusIxianBetrayal = null;
g.nexusIxianBetrayalHistory = [];
@@ -14442,7 +14453,7 @@ function initializeSetupGameForAudit(state: Game, homeworlds: boolean, nexus = f
g.pendingNexusHarkonnenReplacement = null;
g.nexusHarkonnenReplacementHistory = [];
}
if (byFaction(g, 'guild')) initializeGuildBetrayalState(g);
if (nativeNexusCore && byFaction(g, 'guild')) initializeGuildBetrayalState(g);
}
if (semuta) {
requireRule(factions && bareBasicSemutaProfile(g),