Game: the shadow is gated on investigating the scream and helping
- game.yaml: chance events can have `requires` (a gate) and `otherwise`; the shadow requires "Investigate the scream" and "Help your squadmate" (the route PDF's Black Dragon Gates; spreadsheet: 78 shadows in 4199 gated tree runs, 2 in 646 others) - model and advisor: a closed gate fixes the roll; runs off the gate are not counted - form.yaml: "Protect / Help Squadmate" (new answer) -> Protect squadmate Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2271fe0976
commit
64fd3af235
@@ -55,6 +55,8 @@
|
||||
const ctxKey = (s, names) => names.map((k) => (s[k] == null ? "?" : s[k])).join("|");
|
||||
function chance(node, state) {
|
||||
const sp = game.chance[node], cats = sp.outcomes;
|
||||
// a closed gate (game.yaml `requires`): the roll always comes out as `otherwise`
|
||||
if (sp.requires && Object.entries(sp.requires).some(([k, v]) => state[k] !== v)) return Object.fromEntries(cats.map((k) => [k, k === sp.otherwise ? 1 : 0]));
|
||||
let p = null;
|
||||
for (let L = 0; L <= sp.context.length; L++) {
|
||||
const names = sp.context.slice(0, L);
|
||||
|
||||
Reference in New Issue
Block a user