Allow group actions after settled Truthtrance
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
9cc659602c
commit
420943b890
8 files changed
+135
-5
No files matched your search
+10
-4
@@ -16031,6 +16031,11 @@ function allianceQuestionWindow(g: Game): boolean {
|
||||
return !!allianceOpportunity(g) && !g.spiceWindow && !g.spiceResolution && !g.response &&
|
||||
!g.decision && !g.phaseOpening && !g.pendingTreacheryDiscard && !g.pendingKarama && !g.pendingKull;
|
||||
}
|
||||
/** Retained settled Truthtrance history is not an active commitment. Keep
|
||||
* unresolved records fenced until native reconciliation has closed them. */
|
||||
function unsettledPromises(records: readonly {fulfilled?: boolean; released?: boolean}[] | undefined): boolean {
|
||||
return !!records?.some(record => !record.fulfilled && !record.released);
|
||||
}
|
||||
/** Group negotiation is deliberately unexposed until its other alliance
|
||||
* mechanics are integrated. This narrow profile keeps existing pair games
|
||||
* and unrelated commitments on their original paths. */
|
||||
@@ -16044,8 +16049,8 @@ function coalitionNexusAvailable(g: Game): boolean {
|
||||
g.expansions.length === 0 && g.players.every(seat =>
|
||||
['atreides', 'beneGesserit', 'emperor', 'fremen', 'guild', 'harkonnen'].includes(seat.faction)) &&
|
||||
Object.values(g.aid).every(credit => credit.amount === 0) &&
|
||||
!(g.alliancePromises?.length || g.allianceExpressionPromises?.length ||
|
||||
g.bribePromises?.length || g.bribeExpressionPromises?.length || g.turnActionPromises?.length);
|
||||
![g.alliancePromises, g.allianceExpressionPromises, g.bribePromises,
|
||||
g.bribeExpressionPromises, g.turnActionPromises].some(unsettledPromises);
|
||||
}
|
||||
function coalitionRule<T>(work: () => T): T {
|
||||
try { return work(); }
|
||||
@@ -16103,8 +16108,9 @@ function coalitionFundingAvailable(g: Game, p: Player, committedBid = false): bo
|
||||
g.expansions.length || g.homeworlds || g.nexusCards || g.leaderSkills || g.techTokens ||
|
||||
g.strongholdCards || g.ecazTreachery || g.discoveryEnabled ||
|
||||
g.spiceBankerIncomePreview || g.kullPreview || g.richeseAuction || g.ixAuction ||
|
||||
(!committedBid && (g.bidPromises?.length || g.phaseBidPromises?.length || g.turnActionPromises?.length ||
|
||||
g.revivalPromises?.length || g.bribePromises?.length))) return false;
|
||||
(!committedBid && [g.bidPromises, g.phaseBidPromises, g.turnActionPromises,
|
||||
g.revivalPromises, g.leaderRevivalPromises, g.revivalExpressionPromises,
|
||||
g.bribePromises, g.bribeExpressionPromises].some(unsettledPromises))) return false;
|
||||
const group = coalitionRule(() => coalitionOf(g.players, g.coalitionState, p.id));
|
||||
return group?.members.length === 3;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user