Expand Basic No-Field reveal response timing
Verify and publish checkpoint container / container (push) Successful in 11m10s

This commit is contained in:
Quintine committed 2026-10-29 09:47:39 +11:00
1 parent eb68f28a3a
commit 3dbd326891
8 files changed
+574 -1

No files matched your search

+36 -1
View File
@@ -32,9 +32,27 @@ export function richeseRevealInterruptSupported(g: Game): boolean {
// interruption behavior; fresh games initialize an explicit empty history.
if (!Array.isArray(g.truthHistory) || g.truthHistory.some(entry => entry.turn === g.turn)) return false;
// Each pending field is an active child/continuation, not a completed
// An ordinary Guild reserve shipment is independent of Richese's reserves
// and marker when its destination is in a different territory. Its exact
// rate response remains open while the marker is materialized.
const shipment = g.pendingShipment;
const richese = g.players.find(player => player.faction === 'richese');
const marker = richese?.noField?.deployed?.location;
const guildRate = g.response?.kind === 'guildRate' && g.phase === 5 &&
!!shipment && !!richese && !!marker && 'territory' in marker &&
shipment.player === g.response.owner && shipment.player === g.active &&
g.players.some(player => player.id === shipment.player && player.faction === 'guild') &&
shipment.turn === g.turn && shipment.territory !== marker.territory &&
typeof shipment.guildRateEvent === 'string' && shipment.guildRateEvent.length > 0 &&
shipment.guildRateEvent === g.response.guildRateEvent &&
!shipment.source && !shipment.noField && !shipment.alliedNoField && !shipment.richesePair &&
!shipment.guildSecretEvent && !shipment.guildNexusEvent && !shipment.nexusEvent &&
!shipment.homeworldSources && !shipment.smuggler && !shipment.smugglerCompanion;
// Each other pending field is an active child/continuation, not a completed
// receipt. Empty pending arrays do not represent a live child.
if (Object.entries(g).some(([key, value]) => key.startsWith('pending') &&
!(key === 'pendingShipment' && guildRate) &&
(Array.isArray(value) ? value.length > 0 : value !== null && value !== undefined && value !== false))) return false;
const live = (rows: readonly {turn: number; fulfilled?: boolean; released?: boolean}[] | undefined) =>
@@ -65,6 +83,23 @@ export function richeseRevealInterruptSupported(g: Game): boolean {
const owner = g.players.find(player => player.id === response.owner);
if (!owner) return false;
const keys = Object.keys(response).sort().join(',');
if (response.kind === 'guildRate')
return !!guildRate && keys === 'guildRateEvent,intent,kind,owner,passed';
if (response.kind === 'atreidesSpice')
return keys === 'kind,owner,passed' && g.phase === 5 && owner.faction === 'atreides' &&
!g.players.some(player => player.faction === 'beneGesserit') &&
Array.isArray(g.spiceDeck) && g.spiceDeck.length > 0 && g.spicePeekKnown === false &&
Array.isArray(g.movementRemaining) && g.movementRemaining.length > 0;
if (response.kind === 'emperorGift') {
const recipient = g.players.find(player => player.id === response.recipient);
return keys === 'amount,elite,kind,owner,passed,recipient' && owner.faction === 'emperor' &&
!!recipient && recipient.id !== owner.id && owner.ally === recipient.id && recipient.ally === owner.id &&
Number.isSafeInteger(response.amount) && response.amount! > 0 && response.amount! <= owner.spice && response.elite === 0;
}
if (response.kind === 'revivalIncome')
return keys === 'amount,kind,owner,passed,recipient' && owner.faction === 'tleilaxu' &&
g.players.some(player => player.id === response.recipient) &&
Number.isSafeInteger(response.amount) && response.amount! > 0;
if (response.kind === 'choamCharity')
return keys === 'kind,owner,passed' && g.phase === 2 && owner.faction === 'choam' &&
g.choamCharity?.turn !== g.turn;