Expand Basic Richese movement and worm interactions
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
3dbd326891
commit
605cb2a32f
12 files changed
+637
-8
No files matched your search
+18
-5
@@ -1696,7 +1696,7 @@ export type Game = {
|
||||
| { stage: 'offer'; passed: string[] }
|
||||
| { stage: 'select'; player: string; candidates: string[] };
|
||||
continuation:
|
||||
| { kind: 'ambassador'; entry: NonNullable<Game['pendingAmbassador']> }
|
||||
| { kind: 'ambassador'; entry: NonNullable<Game['pendingAmbassador']>; wormCursor?: string }
|
||||
| { kind: 'discoveryStash'; event: string; owner: string; card: string }
|
||||
| { kind: 'nexusChoamTrade'; event: string; owner: string; card: string; spiceAfter: number }
|
||||
| { kind: 'nexusChoamBetrayal'; event: string; owner: string; target: string; card: string; handBefore: number }
|
||||
@@ -9626,6 +9626,11 @@ function supportedRicheseTruthLot(g: Game): boolean {
|
||||
(lot.method === 'onceAround' || lot.method === 'silent') && !lot.outcome &&
|
||||
!g.currentAuctionSale && !g.auction && !g.ixAuction;
|
||||
}
|
||||
/** Bind a parked native ride to its original remaining Spice Blow sequence. */
|
||||
function ambassadorWormDiscardCursor(g: Game): string {
|
||||
return JSON.stringify([g.turn, g.phase, g.wormRides, g.spiceSequence,
|
||||
g.spiceResolution, g.nexus, g.summonedNexusBeforeRides, g.greatMaker]);
|
||||
}
|
||||
function semutaOfferSupported(
|
||||
g: Game,
|
||||
continuation: NonNullable<Game['pendingTreacheryDiscard']>['continuation'],
|
||||
@@ -9727,10 +9732,16 @@ function semutaOfferSupported(
|
||||
!!g.pendingArrivalOverlap && bareBasicSemutaProfile(g) &&
|
||||
g.pendingArrivalOverlap.ambassadorEvent === continuation.entry.ambassadorEvent &&
|
||||
ambassadorTerrorEntryMatches(g, continuation.entry);
|
||||
const ambassadorWormDiscard = ambassadorDiscard && continuation.entry.resume === 'wormRide' &&
|
||||
continuation.entry.arrivalCause === 'wormRide' && g.phase === 1 &&
|
||||
!!continuation.wormCursor && continuation.wormCursor === ambassadorWormDiscardCursor(g) &&
|
||||
validAmbassadorResume(g, continuation.entry) && !g.pendingArrivalOverlap &&
|
||||
(!g.pendingTreacheryDiscard || !!g.pendingTreacheryDiscard.reaction);
|
||||
if (ambassadorDiscard &&
|
||||
(!(bareBasicSemutaProfile(g) || basicIndependentRecruitsSemutaProfile(g) && !g.pendingArrivalOverlap) || g.phase !== 5 ||
|
||||
continuation.entry.stage !== 'cards' || continuation.entry.resume !== 'none' ||
|
||||
!['shipment', 'movement'].includes(continuation.entry.arrivalCause ?? '') ||
|
||||
(!(bareBasicSemutaProfile(g) || basicIndependentRecruitsSemutaProfile(g) && !g.pendingArrivalOverlap) ||
|
||||
!(ambassadorWormDiscard || g.phase === 5 && continuation.entry.resume === 'none' &&
|
||||
['shipment', 'movement'].includes(continuation.entry.arrivalCause ?? '')) ||
|
||||
continuation.entry.stage !== 'cards' ||
|
||||
!['choam', 'ixians'].includes(continuation.entry.effect ?? '') ||
|
||||
continuation.entry.guildAdvisorOrigin || continuation.entry.revivalEvent ||
|
||||
continuation.entry.victoryEvent || continuation.entry.relocation ||
|
||||
@@ -9739,7 +9750,7 @@ function semutaOfferSupported(
|
||||
(g.pendingArrivalOverlap && !overlapOwnsAmbassadorDiscard(g, continuation.entry)) ||
|
||||
g.pendingArrivalReaction?.length ||
|
||||
g.pendingChoamMove || g.pendingIxMove || g.pendingFremenMove ||
|
||||
g.ornithopter || g.summonedWorm || g.wormRides.length > 0 ||
|
||||
g.ornithopter || g.summonedWorm || !ambassadorWormDiscard && g.wormRides.length > 0 ||
|
||||
g.pendingRevival)) return false;
|
||||
if (continuation.kind === 'karamaBgConversionCancelDiscard' &&
|
||||
!semutaBgConversionCancelResponse(g, continuation.use.response, continuation.resume.pendingKarama)) return false;
|
||||
@@ -27427,6 +27438,8 @@ function decideAmbassador(g: Game, p: Player, action: Action) {
|
||||
stageTreacheryDiscard(g, `ambassador:${entry.effect}`, entries, {
|
||||
kind: 'ambassador',
|
||||
entry,
|
||||
...(entry.resume === 'wormRide' && entry.arrivalCause === 'wormRide'
|
||||
? { wormCursor: ambassadorWormDiscardCursor(g) } : {}),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user