Retain independent Ecaz cards with Nexus Kull
Verify and publish checkpoint container / container (push) Canceled after 0s

This commit is contained in:
Quintine committed 2026-11-16 13:50:28 +11:00
1 parent 66c563be71
commit ecc4eb658a
7 files changed
+305 -11

No files matched your search

+20 -10
View File
@@ -8415,7 +8415,7 @@ function treacheryDiscardIntegrity(g: Game) {
);
requireRule(
c.effect === 'recruits'
? g.semutaRecruitsPreview === true && basicIndependentRecruitsSemutaProfile(g) &&
? independentRecruitsSemutaEnabled(g) &&
g.phase === 4 && g.recruits?.turn === g.turn && g.recruits.player === c.player &&
g.recruits.card === c.card
: c.effect === 'hajr'
@@ -9813,7 +9813,7 @@ function semutaOfferSupported(
!continuation.resume.pendingKarama && !continuation.resume.phaseOpening;
}
if (continuation.kind === 'ordinaryCardDiscard' && continuation.effect === 'recruits')
return g.semutaRecruitsPreview === true && basicIndependentRecruitsSemutaProfile(g) &&
return independentRecruitsSemutaEnabled(g) &&
g.status === 'playing' && g.phase === 4 && g.recruits?.turn === g.turn &&
g.recruits.player === continuation.player && g.recruits.card === continuation.card &&
entries.length === 1 && entries[0].publicFace && entries[0].discardedBy === continuation.player &&
@@ -11318,7 +11318,11 @@ function startModules(state: Game): Game {
const g = structuredClone(state);
delete g.lobbyOptions;
if (lobbyKullEnabled(state)) {
if (g.nexusCards && g.advanced === false) return initializeNexusKullGameForAudit(g);
if (g.nexusCards && g.advanced === false) {
requireRule(!options.leaderSkills, 'Kull with Nexus and Leader Skills is not supported yet.');
if (options.ecazTreachery) g.ecazTreachery = true;
return initializeNexusKullGameForAudit(g);
}
const supportedBasic = g.advanced === false && (g.expansions.length === 2 ||
g.expansions.length === 3 && g.expansions.includes('ecaz')) && g.expansions.includes('choam') &&
g.expansions.includes('ix') && !!byFaction(g,'choam') &&
@@ -13750,6 +13754,12 @@ function basicIndependentRecruitsSemutaProfile(g: Game): boolean {
!g.discoveryEnabled && !g.discoveries && !g.discoveryStash && !g.greatMaker &&
!g.nexusKullPreview && !g.moritaniAssassinatePreview;
}
/** Nexus Kull already owns the normal Semuta marker; retain its independent
* Recruits reaction without combining the separate legacy preview markers. */
function independentRecruitsSemutaEnabled(g: Game): boolean {
return g.semutaRecruitsPreview === true && basicIndependentRecruitsSemutaProfile(g) ||
g.ecazTreachery === true && basicNexusKullSemutaProfile(g);
}
function semutaCardProducerEnabled(g: Game): boolean {
return g.semutaPreview === true || g.semutaRecruitsPreview === true && basicIndependentRecruitsSemutaProfile(g);
}
@@ -13844,14 +13854,14 @@ export function initializeKullGameForAudit(state: Game): Game {
g.kullPreview = true;
return g;
}
/** Fresh native CHOAM Kull with the physical Ix deck and only Nexus Cards. */
/** Fresh native CHOAM Kull with Nexus and optional independent Ecaz cards. */
export function initializeNexusKullGameForAudit(state: Game): Game {
requireRule(!state.kullPreview && !state.nexusKullPreview && !state.pendingKull &&
state.kullRestrictions === undefined && state.kullSequence === undefined &&
!state.semutaPreview && !state.richeseBetrayalPreview && !state.richeseBetrayal &&
!state.pendingRicheseBetrayal && !state.homeworlds && !state.leaderSkills &&
!state.discoveryEnabled && !state.discoveries && !state.discoveryStash && !state.greatMaker &&
!state.techTokens && !state.strongholdCards && !state.ecazTreachery &&
!state.techTokens && !state.strongholdCards && (!state.ecazTreachery || !state.advanced) &&
state.nexusCards?.cards === null && state.nexusCards.phase === null &&
typeof state.advanced === 'boolean' && (state.expansions.length === 2 || !state.advanced && state.expansions.length === 3 && state.expansions.includes('ecaz')) &&
state.expansions.includes('choam') && state.expansions.includes('ix') &&
@@ -13859,9 +13869,9 @@ export function initializeNexusKullGameForAudit(state: Game): Game {
state.players.every(p => p.faction === 'choam' || faction(p.faction).expansion === 'base' ||
!state.advanced && (p.faction === 'richese' || p.faction === 'ixians' || p.faction === 'tleilaxu' ||
state.expansions.includes('ecaz') && (p.faction === 'ecaz' || p.faction === 'moritani'))),
'Nexus Kull requires a fresh supported CHOAM lobby with selected faction decks and only Nexus Cards.');
'Nexus Kull requires a fresh supported CHOAM lobby with selected faction decks and supported Nexus and Ecaz cards.');
requireFreshBaseRuntime(state);
const g = initializeSetupGameForAudit(state, false, true, false, false, false, false, true);
const g = initializeSetupGameForAudit(state, false, true, false, false, false, false, true, state.ecazTreachery === true);
g.kullPreview = true;
g.nexusKullPreview = true;
if (!g.advanced && byFaction(g, 'richese')) g.semutaPreview = true;
@@ -20289,7 +20299,7 @@ function kullSettledRestriction(g: Game, frame: KullFrame): KullPhaseRestriction
// Independent printed descriptors, assembled once rather than trusting a saved
// hand to define its own identity or rebuilding the physical deck per quote.
const kullCanonicalCards: Readonly<Record<string, Card>> =
Object.fromEntries([...treacheryDeck(['choam', 'ix']), ...richeseCards()].map(card => [card.id, card]));
Object.fromEntries([...treacheryDeck(['choam', 'ix']), ...richeseCards(), ...ecazTreacheryCards()].map(card => [card.id, card]));
function canonicalKullCard(card: Card): boolean {
const expected = Object.hasOwn(kullCanonicalCards, card.id) ? kullCanonicalCards[card.id] : undefined;
return !!expected && card.name === expected.name && card.kind === expected.kind &&
@@ -20473,7 +20483,7 @@ function kullIntegrity(g: Game): void {
g.expansions.includes('ecaz') && (p.faction === 'ecaz' || p.faction === 'moritani'))) &&
!g.homeworlds && !g.leaderSkills && !g.discoveryEnabled && !g.discoveries &&
!g.discoveryStash && !g.greatMaker &&
!g.techTokens && !g.strongholdCards && !g.ecazTreachery &&
!g.techTokens && !g.strongholdCards && (!g.ecazTreachery || !g.advanced) &&
(!g.semutaPreview || !g.advanced && !!byFaction(g, 'richese')) &&
!g.richeseBetrayalPreview && !g.richeseBetrayal && !g.pendingRicheseBetrayal,
'The Nexus Kull profile has lost its supported native inventory and modules.');
@@ -44943,7 +44953,7 @@ function applyActionInner(
`${p.name} played Recruits. Current free revival rates are doubled and the ordinary force revival limit is seven for this turn.`,
{ faction: p.faction, name: 'Recruits' },
);
if (execution === 'live' && g.semutaRecruitsPreview && basicIndependentRecruitsSemutaProfile(g))
if (execution === 'live' && independentRecruitsSemutaEnabled(g))
stageOrdinaryCardDiscard(g, p, card);
return g;
}
+2 -1
View File
@@ -101,7 +101,8 @@ function basicNativeNexusCore(game: NexusCoreConfiguration): boolean {
if (game.advanced !== false || !game.nexusCards || !players || !game.expansions.length ||
!game.expansions.every(id => id === 'ix' || id === 'choam' || id === 'ecaz') ||
game.homeworlds || game.leaderSkills || game.techTokens || game.strongholdCards ||
game.ecazTreachery || game.discoveryEnabled || game.discoveries || game.discoveryStash || game.greatMaker ||
game.ecazTreachery && !(game.kullPreview === true && game.nexusKullPreview === true) ||
game.discoveryEnabled || game.discoveries || game.discoveryStash || game.greatMaker ||
game.advancedPreview || game.richeseBetrayalPreview) return false;
if (game.semutaPreview && (game.semutaPreview !== true ||
!game.expansions.includes('choam') || !players.some(player => player.faction === 'richese'))) return false;