Support early Advanced Charity commitments
Verify and publish checkpoint container / container (push) Successful in 11m25s
Verify and publish checkpoint container / container (push) Successful in 11m25s
This commit is contained in:
1 parent
68c7434a20
commit
ad0abfef98
8 files changed
+294
-14
No files matched your search
+3
-3
@@ -17735,8 +17735,8 @@ function charityPromiseRule<T>(run: () => T): T {
|
||||
}
|
||||
}
|
||||
function charityQuestionWindow(g: Game): boolean {
|
||||
const timing = !g.advanced && g.phase >= 0 && g.phase <= 2 && !g.charityOrder ||
|
||||
g.advanced && g.phase === 2 && !!g.charityOrder;
|
||||
const timing = g.phase >= 0 && g.phase < 2 && !g.charityOrder ||
|
||||
g.phase === 2 && (g.advanced ? !!g.charityOrder : !g.charityOrder);
|
||||
return g.status === 'playing' && timing &&
|
||||
!g.response && !g.decision && !g.phaseOpening && !g.pendingKarama && !g.pendingTreacheryDiscard &&
|
||||
(g.phase < 2 || !byFaction(g, 'choam') || g.choamCharity?.turn === g.turn);
|
||||
@@ -17812,7 +17812,7 @@ function reconcileCharityTruth(g: Game,voluntary?: {actor:string;action:Action})
|
||||
const rows: CharityPromise[] = promises.filter(row => row.player === player && !row.fulfilled && !row.released);
|
||||
for (const turn of new Set(rows.map(row => row.turn))) {
|
||||
const open = g.status === 'playing' && g.turn === turn &&
|
||||
(!g.advanced && g.phase >= 0 && g.phase <= 2 ||
|
||||
(g.phase >= 0 && g.phase < 2 || !g.advanced && g.phase === 2 ||
|
||||
g.advanced && g.phase === 2 && !!g.charityOrder?.remaining.includes(player));
|
||||
const before: CharityPromise[] = promises;
|
||||
promises = charityPromiseRule(() => reconcileCharityPromises(before,player,turn,
|
||||
|
||||
Reference in new issue
Block a user