Complete Advanced Revival suspension and solo win ranking
This commit is contained in:
1 parent
812657bb35
commit
3c62c284a7
17 files changed
+598
-47
No files matched your search
+7
-5
@@ -7709,8 +7709,8 @@ function treacheryDiscardIntegrity(g: Game) {
|
||||
charityOrderIntegrity(g);
|
||||
} else if (continuation?.kind === 'saphoRevivalDiscard') {
|
||||
const c=continuation,entry=batch.entries[0],frame=g.revivalOrder;
|
||||
const latest=frame?.version===2 ? frame.uses.at(-1) : null;
|
||||
requireRule(g.advanced && g.phase===4 && frame?.version===2 &&
|
||||
const latest=frame && frame.version!==1 ? frame.uses.at(-1) : null;
|
||||
requireRule(g.advanced && g.phase===4 && frame && frame.version!==1 &&
|
||||
latest?.event===c.event && latest.player===c.player && latest.mode===c.mode &&
|
||||
batch.cause==='sapho:revival' && batch.entries.length===1 &&
|
||||
entry.publicFace && entry.discardedBy===c.player && entry.card.id===c.card &&
|
||||
@@ -9048,7 +9048,7 @@ function semutaOfferSupported(
|
||||
continuation.resume.pendingKarama || continuation.resume.phaseOpening ||
|
||||
g.response || g.decision || g.pendingRevival)) return false;
|
||||
if (continuation.kind === 'saphoRevivalDiscard' &&
|
||||
(!g.advanced || g.phase!==4 || g.revivalOrder?.version!==2 ||
|
||||
(!g.advanced || g.phase!==4 || !g.revivalOrder || g.revivalOrder.version===1 ||
|
||||
continuation.resume.response || continuation.resume.decision ||
|
||||
continuation.resume.pendingKarama || continuation.resume.phaseOpening ||
|
||||
g.response || g.decision || g.pendingRevival)) return false;
|
||||
@@ -27174,12 +27174,14 @@ function saphoOptions(g: Game, p: Player): SaphoOption[] {
|
||||
}
|
||||
}
|
||||
if (g.phase===4 && g.advanced && g.revivalOrder) {
|
||||
if (g.pendingRevival) return options;
|
||||
const context=revivalOrderContext(g);
|
||||
const event=revivalOrderRule(()=>saphoRevivalOrderEvent(context,g.revivalOrder!));
|
||||
for (const mode of ['first','last'] as const) {
|
||||
try {
|
||||
const quote=reorderSaphoRevivalOrder(context,g.revivalOrder,{event,player:p.id,mode});
|
||||
options.push({scope:'revival',event,mode,...(quote.afterCurrent ? {afterCurrent:quote.afterCurrent} : {})});
|
||||
options.push({scope:'revival',event,mode,...(quote.afterCurrent ? {afterCurrent:quote.afterCurrent} : {}),
|
||||
...(quote.suspended ? {resumeOwn:true as const} : {})});
|
||||
} catch(error) {
|
||||
if (!(error instanceof RevivalOrderError)) throw error;
|
||||
}
|
||||
@@ -27389,7 +27391,7 @@ function playSapho(g: Game, p: Player, action: Action) {
|
||||
const used=discard(g,p,'richese-juice-of-sapho');
|
||||
g.revivalOrder=quote.order;
|
||||
g.active=quote.order.remaining[0] ?? null;
|
||||
log(g,`${p.name} discarded Juice of Sapho to take their remaining Revival turn ${option.mode}.${quote.afterCurrent ? ` Provisional queued order: ${getPlayer(g,quote.afterCurrent).name} finishes the started turn first.` : ''} Completed turns, native allowances and physical First Player order stay unchanged.`,
|
||||
log(g,`${p.name} discarded Juice of Sapho to take their remaining Revival turn ${option.mode}.${quote.suspended ? ' Their started turn pauses provisionally and resumes last with its used allowances unchanged.' : ''}${quote.afterCurrent ? ` Provisional queued order: ${getPlayer(g,quote.afterCurrent).name} finishes the started turn first.` : ''} Completed turns, native allowances and physical First Player order stay unchanged.`,
|
||||
{faction:p.faction,name:'Juice of Sapho'});
|
||||
if (g.semutaPreview) {
|
||||
const continuation:SaphoRevivalDiscardContinuation={kind:'saphoRevivalDiscard',player:p.id,card:used.id,
|
||||
|
||||
Reference in new issue
Block a user