Allow Richese special purchase at Ix openings
Verify and publish checkpoint container / container (push) Successful in 10m34s

This commit is contained in:
Quintine committed 2026-11-16 15:40:07 +11:00
1 parent d169740adf
commit 53780c11d8
10 files changed
+395 -5

No files matched your search

+15 -2
View File
@@ -2728,7 +2728,10 @@ export type Game = {
owner: string;
turn: number;
phase: number;
resume: Pick<Game, 'response' | 'decision' | 'pendingKarama'>;
resume: Pick<Game, 'response' | 'decision' | 'pendingKarama'> & {
/** Present only when a newer purchase suspended an Ix phase opening. */
phaseOpening?: Game['phaseOpening'];
};
} | null;
pendingKarama?: {
owner: string;
@@ -27398,6 +27401,7 @@ function runOccupiedPercentageSuffix(g: Game, suffix: OccupiedPercentageSuffix)
else if (suffix.kind === 'richesePurchase') {
g.pendingRichesePurchaseIncome = null;
g.response = suffix.resume.response; g.decision = suffix.resume.decision; g.pendingKarama = suffix.resume.pendingKarama;
if (Object.hasOwn(suffix.resume, 'phaseOpening')) g.phaseOpening = suffix.resume.phaseOpening;
} else if (suffix.kind === 'none') {
g.decision = suffix.decision;
}
@@ -40066,6 +40070,7 @@ function finishResponse(g: Game, canceled: boolean, settlement?: BureaucratSettl
g.response = resume.response;
g.decision = resume.decision;
g.pendingKarama = resume.pendingKarama;
if (Object.hasOwn(resume, 'phaseOpening')) g.phaseOpening = resume.phaseOpening;
} else if (response.kind === 'emperorIncome') {
if (!canceled) {
const owner = getPlayer(g, response.owner);
@@ -42936,7 +42941,9 @@ export function prepareSpecialKaramaIntent(
requireRule(!g.truthtrance, 'Resolve the current Truthtrance first.');
if (p.faction !== 'choam') {
requireRule(
!g.phaseOpening,
!g.phaseOpening || p.faction === 'richese' && g.expansions.includes('ix') &&
!g.response && !g.decision && !g.pendingKarama && !g.pendingKull && !g.pendingTreacheryDiscard &&
!(g.phase === 3 && g.nexusIxianReplacementPreview),
'Play Amal or pass the phase opening before taking other actions.',
);
requireRule(
@@ -43400,10 +43407,12 @@ function resolveSpecialKaramaEffect(g: Game, p: Player, card: Card, intent: Spec
response: g.response,
decision: g.decision,
pendingKarama: g.pendingKarama ?? null,
...(g.phaseOpening ? {phaseOpening: structuredClone(g.phaseOpening)} : {}),
},
};
g.decision = null;
g.pendingKarama = null;
if (g.phaseOpening) g.phaseOpening = null;
g.response = {
kind: 'richesePurchaseIncome',
owner: emperor.id,
@@ -45412,6 +45421,10 @@ function applyActionInner(
specialKarama(g, p, action);
return g;
}
if (t === 'card' && action.mode === 'special' && p.faction === 'richese' && g.phaseOpening) {
specialKarama(g, p, action);
return g;
}
if (t === 'card' && choamSaleGholaTiming(g) &&
p.hand.some((card) => card.id === action.card && card.effect === 'ghola')) {
playMarketGhola(g, p, action);