Combine current facts with native Revival

This commit is contained in:
Quintine committed 2026-10-26 16:53:27 +11:00
1 parent 6b2dfb84a2
commit 957d5a172f
19 files changed
+1386 -5

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import { parseRevivalExpression, RevivalExpressionPromiseError, type RevivalExpressionLeaf } from './revival-expression-promises';
import type { MixedActionExpression } from './mixed-action-question';
export type RevivalActionClaim = RevivalExpressionLeaf;
export type MixedRevivalClaim = { turn: number; mixed: MixedActionExpression<RevivalActionClaim> };
/** Only one exact native force or personal-leader leaf belongs in an action.
* Mixed groups use the outer shared grammar and budget instead. */
export function parseRevivalActionClaim(value: unknown): RevivalActionClaim {
const action = parseRevivalExpression(value);
if (action.kind === 'forces' || action.kind === 'leader') return action;
throw new RevivalExpressionPromiseError('Supply one ordinary force or named-leader return condition.');
}