Allow bribes during classic pending decisions
Verify and publish checkpoint container / container (push) Successful in 10m47s
Verify and publish checkpoint container / container (push) Successful in 10m47s
This commit is contained in:
1 parent
1e81ce8ad8
commit
6ecd26c8d1
8 files changed
+444
-5
No files matched your search
+34
-2
@@ -17342,10 +17342,10 @@ function bribePaymentPreservesPromises(g: Game, p: Player, recipient: string, am
|
||||
* advancing their pending state. Existing whole-promise planners retain their
|
||||
* original timing boundary until those compositions are implemented. */
|
||||
function basicBribeInterrupt(g: Game, p: Player): boolean {
|
||||
if (g.status !== 'playing' || g.advanced || g.expansions.length !== 1 ||
|
||||
if (g.status !== 'playing' || g.advanced || g.expansions.length > 1 ||
|
||||
g.inflation?.side === 'double' || g.techTokens || g.strongholdCards || g.leaderSkills ||
|
||||
g.homeworlds || g.nexusCards || g.discoveryEnabled || g.sandtrout || g.coalitionState ||
|
||||
g.ecazTreachery || g.semutaPreview || g.semutaRecruitsPreview || g.truthtrance || g.response ||
|
||||
g.ecazTreachery || g.semutaPreview || g.semutaRecruitsPreview || g.truthtrance ||
|
||||
g.pendingKarama || g.pendingKull || g.pendingTreacheryDiscard || g.pendingNullentropy ||
|
||||
g.bureaucratPayments?.pending || g.battle || g.pendingRicheseGift || g.pendingShipment ||
|
||||
g.pendingGuildTransport || g.pendingArrivalOverlap || g.pendingAmbassador || g.pendingEmperorAuctionGift ||
|
||||
@@ -17356,9 +17356,41 @@ function basicBribeInterrupt(g: Game, p: Player): boolean {
|
||||
liveRevivalExpressionPromises(g.revivalExpressionPromises ?? [], p.id, g.turn).length ||
|
||||
liveTurnActionPromises(g.turnActionPromises ?? [], p.id, g.turn).length ||
|
||||
livePhaseBidPromises(g.phaseBidPromises ?? [], p.id, g.turn).length ||
|
||||
(g.bidPromises ?? []).some(row => row.player === p.id && row.turn === g.turn && !row.fulfilled && !row.released) ||
|
||||
(g.earlyRicheseBidPromises ?? []).some(row => row.player === p.id && row.turn === g.turn && !row.fulfilled && !row.released) ||
|
||||
(g.richeseBidPromises ?? []).some(row => row.player === p.id && row.turn === g.turn && !row.fulfilled && !row.released) ||
|
||||
(g.charityPromises ?? []).some(row => row.player === p.id && row.turn === g.turn && !row.fulfilled && !row.released) ||
|
||||
(g.alliancePromises ?? []).some(row => row.player === p.id && row.turn === g.turn && !row.fulfilled && !row.released) ||
|
||||
(g.allianceExpressionPromises ?? []).some(row => row.player === p.id && row.turn === g.turn && !row.fulfilled && !row.released) ||
|
||||
(g.pledgePromises ?? []).some(row => row.player === p.id && row.turn === g.turn && !row.fulfilled && !row.released) ||
|
||||
(g.deals ?? []).some(row => row.status === 'active' && row.payment?.payer === p.id && row.paymentStatus === 'pending')) return false;
|
||||
const classic = ['atreides', 'beneGesserit', 'emperor', 'fremen', 'guild', 'harkonnen'];
|
||||
if (!g.expansions.length) {
|
||||
if (g.phaseOpening || !g.players.every(seat => classic.includes(seat.faction)) ||
|
||||
Object.entries(g).some(([key, value]) => key.startsWith('pending') &&
|
||||
(Array.isArray(value) ? value.length > 0 : value !== null && value !== undefined && value !== false))) return false;
|
||||
if (g.decision?.kind === 'auctionPayment' && !g.response)
|
||||
return g.phase === 3 && !!g.auction && !g.richeseAuction && !g.currentAuctionSale &&
|
||||
g.auction.bidder === g.decision.player && !!g.auction.cards[g.auction.index];
|
||||
const response = g.response;
|
||||
if (!response || g.decision || !Array.isArray(response.passed) ||
|
||||
new Set(response.passed).size !== response.passed.length ||
|
||||
response.passed.some(id => !g.players.some(seat => seat.id === id))) return false;
|
||||
const owner = g.players.find(seat => seat.id === response.owner);
|
||||
const keys = Object.keys(response).sort().join(',');
|
||||
if (response.kind === 'atreidesAuction') return keys === 'kind,owner,passed' && g.phase === 3 &&
|
||||
owner?.faction === 'atreides' && !!g.auction && !g.richeseAuction && !g.currentAuctionSale &&
|
||||
!!g.auction.cards[g.auction.index];
|
||||
if (response.kind === 'fremenRevivalGrant') {
|
||||
if (keys !== 'fremenGrant,kind,owner,passed,recipient' || g.phase !== 4 || owner?.faction !== 'fremen' ||
|
||||
!response.fremenGrant || response.fremenGrant.owner !== response.owner ||
|
||||
response.fremenGrant.recipient !== response.recipient) return false;
|
||||
try { validateFremenRevivalGrant(g, response.fremenGrant); return true; }
|
||||
catch (error) { if (error instanceof FremenRevivalGrantError) return false; throw error; }
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (g.response) return false;
|
||||
if (g.expansions[0] === 'ix') return !!g.phaseOpening && !!g.amalWindowOpen && !g.decision &&
|
||||
g.players.every(seat => [...classic, 'ixians', 'tleilaxu'].includes(seat.faction));
|
||||
const extortion = g.moritaniExtortion, decision = g.decision;
|
||||
|
||||
Reference in new issue
Block a user