Support mixed-deck Emperor gifts at Ix openings
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
0c64d320ea
commit
66c563be71
7 files changed
+204
-14
No files matched your search
+10
-8
@@ -10093,7 +10093,8 @@ function semutaOfferSupported(
|
||||
continuation.kind === 'choamSaleDiscard' || continuation.kind === 'choamKulonDiscard' ||
|
||||
continuation.kind === 'choamLaLaLaDiscard' || continuation.kind === 'choamBalisetDiscard' ||
|
||||
continuation.kind === 'choamGamontDiscard' || continuation.kind === 'choamJubbaDiscard' ||
|
||||
continuation.kind === 'karamaShipmentPriceDiscard';
|
||||
continuation.kind === 'karamaShipmentPriceDiscard' ||
|
||||
continuation.kind === 'karamaEmperorShareDiscard' && !!continuation.use.response.emperorPhaseOpeningGift;
|
||||
return (g.semutaPreview === true ||
|
||||
g.semutaAdvancedOrdinaryPreview === true && bareAdvancedClassicSemutaProfile(g) &&
|
||||
(!g.pendingTreacheryDiscard || !!g.pendingTreacheryDiscard.reaction) &&
|
||||
@@ -30539,16 +30540,15 @@ function emperorPhaseOpeningGiftSignature(g: Game, opening: {passed: string[]; i
|
||||
return JSON.stringify([g.turn, g.phase, g.active, g.order, g.ready, g.amalWindowOpen ?? false,
|
||||
opening, owner, recipient, amount]);
|
||||
}
|
||||
/** Initial Basic Ix opening support, with no independent competing windows. */
|
||||
/** Basic selected-deck Ix opening support, with no competing windows. */
|
||||
function emperorPhaseOpeningGiftPublicEligible(g: Game, p: Player): boolean {
|
||||
if (g.advanced || g.status !== 'playing' || g.expansions.length !== 1 || g.expansions[0] !== 'ix' ||
|
||||
g.players.some(seat => !['atreides', 'beneGesserit', 'emperor', 'fremen', 'guild', 'harkonnen', 'ixians', 'tleilaxu'].includes(seat.faction)) ||
|
||||
g.techTokens || g.strongholdCards || g.leaderSkills || g.homeworlds || g.nexusCards ||
|
||||
g.discoveryEnabled || g.sandtrout || g.coalitionState || g.semutaPreview || g.semutaRecruitsPreview ||
|
||||
if (g.advanced || g.status !== 'playing' || !g.expansions.includes('ix') || !selectedPhaseModuleRoster(g) ||
|
||||
g.techTokens || g.strongholdCards || g.leaderSkills || g.homeworlds ||
|
||||
g.discoveryEnabled || g.sandtrout || g.coalitionState ||
|
||||
!g.phaseOpening || !g.amalWindowOpen ||
|
||||
g.response || g.decision || g.truthtrance || g.pendingKarama || g.pendingTreacheryDiscard || g.battle ||
|
||||
g.pendingRicheseGift || g.pendingNullentropy || g.pendingShipment || g.pendingGuildTransport ||
|
||||
g.pendingArrivalOverlap || g.pendingAmbassador || g.pendingEmperorAuctionGift ||
|
||||
g.pendingArrivalOverlap || g.pendingAmbassador || g.pendingEmperorAuctionGift || g.pendingNexusHarkonnenReplacement ||
|
||||
p.faction !== 'emperor' || !p.ally ||
|
||||
!g.players.some(seat => seat.id === p.ally && seat.ally === p.id)) return false;
|
||||
return true;
|
||||
@@ -43485,7 +43485,9 @@ function applyActionWithInitiator(state: Game, id: string, action: Action, initi
|
||||
const phaseGiftResponse = state.response?.emperorPhaseOpeningGift ||
|
||||
(state.pendingKarama?.use.kind === 'cancel' && state.pendingKarama.use.response.emperorPhaseOpeningGift);
|
||||
if (phaseGiftResponse && action?.type !== 'advanceBots')
|
||||
requireRule(action?.type === 'passResponse' || action?.type === 'card' && action.mode === 'cancel',
|
||||
requireRule(action?.type === 'passResponse' || action?.type === 'card' && action.mode === 'cancel' ||
|
||||
action?.type === 'kullDecision' && !!state.pendingKull &&
|
||||
state.pendingKull.resume.response?.emperorPhaseOpeningGift?.event === phaseGiftResponse.event,
|
||||
'Resolve the Emperor gift response before another action.');
|
||||
const extortionGiftResponse = state.response?.emperorExtortionGift ||
|
||||
(state.pendingKarama?.use.kind === 'cancel' && state.pendingKarama.use.response.emperorExtortionGift);
|
||||
|
||||
Reference in new issue
Block a user