miaoda-game-investigation-core
v0.2.0
Published
Declarative detective-case compiler for miaoda-game-adventure-interaction-core.
Maintainers
Readme
miaoda-game-investigation-core
Compile declarative detective case content into ordinary adventure-interaction-core rules. Use it when statements, evidence contradictions, and accusations should share one query, dispatch, event, and snapshot path.
pnpm add miaoda-game-investigation-core miaoda-game-adventure-interaction-coreconst compiled = compileInvestigationContent(adventureContent, caseFile);
const game = new AdventureInteractionEngine(compiled.content);Statements become validated targets, applying evidence to a statement records a fact, and accusations become rules with pure prerequisite conditions. The compiler rejects empty or duplicate case IDs, dangling references, duplicate contradiction facts, conflicting rule IDs, and invalid merged content before play starts. Execution and save semantics come from the interaction core.
