Support Kull during Basic Guild and revival responses
Verify and publish checkpoint container / container (push) Failing after 6m28s

This commit is contained in:
Quintine committed 2026-10-28 20:57:25 +11:00
1 parent 91ce096818
commit 71009d73e3
7 files changed
+431 -9

No files matched your search

+26 -3
View File
@@ -6878,6 +6878,26 @@ type KullSemutaDiscardContinuation = Extract<
function kullSemutaParentSupported(g: Game, frame?: NonNullable<Game['pendingKull']>): boolean {
const battle = g.battle;
const use = frame?.intent.kind === 'ordinary' ? frame.intent.use : undefined;
const nativeResponse = !!frame && !g.advanced && bareBasicSemutaProfile(g) &&
use?.kind === 'cancel' && JSON.stringify(use.response) === JSON.stringify(frame.resume.response) &&
!frame.resume.decision && !frame.resume.pendingKarama && !frame.resume.phaseOpening;
let revivalSupported = false;
let guildSupported = false;
if (nativeResponse && frame && use?.kind === 'cancel') {
// Success has just installed this very Kull restriction. Validate the
// suspended source as it stood before that restriction, without changing
// the live game or removing any other player's restriction.
const restriction = kullSettledRestriction(g, frame);
const source = { ...g, kullRestrictions: (g.kullRestrictions ?? []).filter(row =>
JSON.stringify(row) !== JSON.stringify(restriction)) };
try {
revivalSupported = !!g.pendingRevival && semutaRevivalKaramaResponse(source, use.response, frame.owner);
guildSupported = (!!g.pendingShipment || !!g.pendingGuildTransport) &&
semutaGuildShipmentKaramaResponse(source, use.response);
} catch (error) {
if (!(error instanceof RuleError)) throw error;
}
}
const battleSupported = !battle || !!frame && !g.advanced && g.phase === 6 && !battle.revealed &&
!!battle.event && (!battle.preLeader || battle.preLeader.event === battle.event &&
Array.isArray(battle.preLeader.ready) && new Set(battle.preLeader.ready).size === battle.preLeader.ready.length &&
@@ -6887,8 +6907,9 @@ function kullSemutaParentSupported(g: Game, frame?: NonNullable<Game['pendingKul
JSON.stringify(use.response) === JSON.stringify(frame.resume.response) &&
!frame.resume.decision && !frame.resume.pendingKarama && !frame.resume.phaseOpening;
return battleSupported && !g.truthtrance && !g.pendingRicheseGift && !g.pendingNullentropy &&
!g.pendingAmbassador && !g.pendingIxAlly && !g.pendingRevival && !g.pendingShipment &&
!g.pendingGuildTransport && !g.pendingHomeworldShipment && !g.pendingTerrorEntry &&
!g.pendingAmbassador && !g.pendingIxAlly && (!g.pendingRevival || revivalSupported) &&
(!g.pendingShipment || guildSupported) && (!g.pendingGuildTransport || guildSupported) &&
!g.pendingHomeworldShipment && !g.pendingTerrorEntry &&
!g.pendingEcazPlacement && !g.pendingMoritaniPlacement &&
!g.pendingArrivalOverlap && !g.pendingArrivalReaction?.length && !g.pendingExchange &&
!g.pendingRichesePurchaseIncome && !g.pendingChoamMarketGhola && !g.currentAuctionSale &&
@@ -37547,7 +37568,9 @@ function savedNoFieldResponses(g: Game): ResponseWindow[] {
const continuation = g.pendingTreacheryDiscard?.continuation;
const contexts = [g, g.pendingExchange, g.pendingNullentropy?.resume, g.pendingRicheseGift?.resume,
g.pendingRichesePurchaseIncome?.resume, g.summonedWorm?.resume,
continuation && 'resume' in continuation ? continuation.resume : null];
continuation && 'resume' in continuation ? continuation.resume : null,
g.pendingKull?.stage === 'counter' ? g.pendingKull.resume : null,
continuation?.kind === 'kullCounterDiscard' ? continuation.frame.resume : null];
return contexts.flatMap(context => {
const karama = context && 'pendingKarama' in context ? context.pendingKarama as Game['pendingKarama'] : null;
return [context?.response, karama?.use.kind === 'cancel' ? karama.use.response : null];