Extend Truthtrance facts and Basic Semuta Tech
Verify and publish checkpoint container / container (push) Failing after 10m53s

This commit is contained in:
Quintine committed 2026-10-29 05:15:04 +11:00
1 parent 16f10beecf
commit 7a083ac9aa
12 files changed
+361 -6

No files matched your search

+10 -2
View File
@@ -66,6 +66,7 @@ import { coalitionAllies } from './coalition-alliance';
import { TRUTH_CARD_NAMES } from './truthtrance-card-names';
import { parseFreeformFactV1 } from './truthtrance-freeform-facts';
import { parseFreeformFactV2 } from './truthtrance-freeform-facts-v2';
import { parseFreeformFactV3 } from './truthtrance-freeform-facts-v3';
import { CHEAP_HERO_TRAITOR } from './traitors';
import {
TRUTH_FACT_MAX_NODES, TRUTH_FACT_MAX_DEPTH, TRUTH_FACT_MAX_TERMS,
@@ -129,7 +130,7 @@ export type TruthQuestion =
text: string;
scope: 'fact' | 'currentTurn';
/** Only newly asked, explicitly recognized facts carry this stable interpretation. */
interpreted?: { version: 1; fact: Extract<TruthFact, { kind: 'hand' | 'spice' }> } | { version: 2; fact: TruthFact };
interpreted?: { version: 1; fact: Extract<TruthFact, { kind: 'hand' | 'spice' }> } | { version: 2 | 3; fact: TruthFact };
};
export type TruthAnswer = 'yes' | 'no' | 'unknown';
export type TruthQueueEntry = {
@@ -657,8 +658,11 @@ function parseQuestion(g: Game, asker: string, value: unknown): TruthQuestion {
const marker = record(v.interpreted);
const oldFact = question.scope === 'fact' && marker.version === 1 ? parseFreeformFactV1(question.text) : null;
const newFact = question.scope === 'fact' && marker.version === 2 ? parseFreeformFactV2(question.text) : null;
const categoryFact = question.scope === 'fact' && marker.version === 3 && !parseFreeformFactV2(question.text)
? parseFreeformFactV3(question.text) : null;
const expected = oldFact ? { version: 1 as const, fact: oldFact }
: newFact ? { version: 2 as const, fact: newFact } : null;
: newFact ? { version: 2 as const, fact: newFact }
: categoryFact ? { version: 3 as const, fact: categoryFact } : null;
check(expected !== null && JSON.stringify(v.interpreted) === JSON.stringify(expected),
'The saved freeform interpretation does not match its original question.');
question.interpreted = expected;
@@ -1119,6 +1123,10 @@ export function resolveTruthAction(
if (w.question.kind === 'freeform' && w.question.scope === 'fact') {
const fact = parseFreeformFactV2(w.question.text);
if (fact) w.question.interpreted = { version: 2, fact };
else {
const categoryFact = parseFreeformFactV3(w.question.text);
if (categoryFact) w.question.interpreted = { version: 3, fact: categoryFact };
}
}
if (w.question.kind === 'mixedBattlePlan')
check(effects.mixedBattleAnswers?.(g, g.players.find(other => other.id === w.question!.target)!, w.question).length,