Coordinate Fremen grants in ordered revival
Verify and publish checkpoint container / container (push) Canceled after 0s

This commit is contained in:
Quintine committed 2026-10-29 09:19:17 +11:00
1 parent 64706cc7e0
commit 220d78c779
11 files changed
+429 -12

No files matched your search

+20
View File
@@ -1501,6 +1501,8 @@ export type Game = {
mentatVictoryAfterActions?: number;
charityPromises?: CharityPromise[];
revivalOrder?: RevivalOrder;
/** Owner's per-ally release of the provisional ordered bot wait. */
fremenRevivalWaitRelease?: { turn: number; recipients: string[] };
charityOrder?: CharityOrder;
pendingAutomaticAdvisorFlips?: AutomaticAdvisorFlipSource[];
pendingAutomaticAdvisorTransport?: AutomaticAdvisorTransport;
@@ -30531,6 +30533,7 @@ function beginPhase(g: Game) {
}
}
if (g.phase === 4) {
delete g.fremenRevivalWaitRelease;
g.revivalRules = newRevivalRules();
g.revivalRequests = {};
g.freeRevival = [];
@@ -46752,6 +46755,23 @@ function applyActionInner(
};
return g;
}
if (t === 'releaseFremenRevivalWait') {
requireRule(Object.keys(action).sort().join(',') === 'target,type' &&
g.phase === 4 && g.advanced && g.revivalOrder && p.faction === 'fremen',
'Release an automated ally only during ordered Advanced Revival.');
requireRule(!recruitsInteractionPending(g), 'Finish the current revival transaction or priority window first.');
const target = stringField(action.target);
const recipient = getPlayer(g, target);
requireRule(!!(recipient.bot || recipient.autopilot) && g.revivalOrder.remaining.includes(target),
'Choose an automated ally whose Revival turn remains.');
fremenRevivalGrantRule(() => quoteFremenRevivalGrant(g, id, target));
const released = g.fremenRevivalWaitRelease?.turn === g.turn
? g.fremenRevivalWaitRelease.recipients : [];
requireRule(!released.includes(target), 'This ally has already been released from the wait.');
g.fremenRevivalWaitRelease = {turn: g.turn, recipients: [...released, target]};
log(g, `${p.name} released ${recipient.name} to continue Revival without waiting for a Fremen grant.`);
return g;
}
if (t === 'grantRevival') {
requireRule(g.phase === 4 && p.faction === 'fremen',
'Only Fremen may grant their ally free revival during revival.');