${esc(s.pick.say)}${s.roll ? `
The guide notes: ${esc(s.roll)}.` : ""}
+ const rows = steps.map((s, i) => `
${i + 1}${esc(s.pick.say)}${s.roll ? `
${Dice.html({ title: "A roll (from the community guide)", note: `The guide notes: ${s.roll}. It gives no odds for it.` })}The guide notes: ${esc(s.roll)}.` : ""}
${s.pick.pct ? `the guide's rate: ${esc(s.pick.pct)}` : ""}${s.pick.unconfirmed ? " · unconfirmed" : ""}${s.pick.end ? `${s.pick.pct ? " · " : ""}${esc(s.pick.end)}` : ""}
${s.others.length ? `
Other answers here
${s.others.map((o) => `- ${esc(o.say)}${o.pct ? ` ${esc(o.pct)}` : ""} → ${esc(endOf(o))}
`).join("")}
` : ""}
`).join("");
return `
${esc(E.title)}: ${esc(E.scene)}${E.warning ? ` ${esc(E.warning)}` : ""}
@@ -831,7 +839,7 @@
const others = Object.entries(sc.options).filter(([k]) => k !== p.option).map(([, o]) =>
`
${esc(o.text)} ${o.n ? `died ${died(o)} of ${o.n}` : "untested"}`).join("");
return `
${i + 1}${esc(p.text)}
-
${me.n ? `got through ${lived} of ${me.n} times` : ""}${me.kind === "fixed" && me.n ? " · always the same so far" : me.kind === "dice" ? " · a roll" : ""}
+
${me.n ? `got through ${lived} of ${me.n} times` : ""}${me.kind === "fixed" && me.n ? " · always the same so far" : me.kind === "dice" ? ` · a roll ${Dice.html({ title: p.text, n: me.n, options: Object.entries(me.to || {}).map(([k, o]) => [k === "DIED" ? "died" : k.startsWith("BONDED") ? k.replace("BONDED_", "bonded ").toLowerCase() : (t.screens[k] ? `then: ${t.screens[k].stage.toLowerCase().replace(/_/g, " ")}${t.screens[k].tint ? ` (${t.screens[k].tint})` : ""}` : k), o.n / me.n]), note: "The same answer led to different screens in the bot's runs: the game rolled." })}` : ""}
${others ? `
Other answers here
` : ""}
`;
}).join("");
const end = Object.keys((t.screens[picks[picks.length - 1].screen] || { options: {} }).options[picks[picks.length - 1].option]?.to || {}).find((k) => k.startsWith("BONDED"));
@@ -855,7 +863,7 @@
${pct(r.value.x)}${st.colour === "Black" ? "on a first attempt" : "per attempt"} · ${bond}${n < 30 ? ` · only ${n} attempts logged` : ""}${r.value.o > 0.005 ? ` · ends on another dragon ${pct(r.value.o)}` : ""}`;
};
const steps = focus.steps.filter((s) => s.kind === "decision" || s.kind === "chance").map((s) => {
- if (s.kind === "chance") return `
${esc(s.label)}${esc(String(s.taken))}roll ${pct(s.probs[s.taken])}`;
+ if (s.kind === "chance") return `
${esc(s.label)} ${Dice.html(rollOf(s))}${esc(String(s.taken))}roll ${pct(s.probs[s.taken])}`;
const open = st.expanded === s.var;
const opts = open ? `
${Object.entries(s.options).sort((a, c) => c[1].pX - a[1].pX).map(([v, val]) =>
``).join("")}
` : "";
@@ -871,6 +879,7 @@
${st.blocked ? `
Your choices so far can't reach a ${st.colour} dragon.
` : ""}
${routes.map(card).join("")}
best route under half as likely under a tenth · line width: chance you are still on the route
+
${Dice.legend()}
${esc(ENC_NAME[focus.enc])}: step by step
${steps}
Diamonds on the map are choices: click one to see where the other options lead. ${st.blocked ? "" : `Your choices apply to every route to this dragon. Changed your mind? `}
diff --git a/site/atlas/index.html b/site/atlas/index.html
index fda0874..eed441e 100644
--- a/site/atlas/index.html
+++ b/site/atlas/index.html
@@ -89,6 +89,20 @@ button.primary, a.btnlike.primary { background: var(--accent); color: var(--acce
#map text { font-family: var(--font-body); font-size: 11px; fill: var(--ink); }
#map .stage-label { font-family: var(--font-data); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--muted); }
#map .stage-chance { fill: var(--accent); }
+/* rolls of the dice (dice.js): a step the game decides, not the rider */
+.dice { display: inline-flex; align-items: center; vertical-align: middle; padding: 0 2px; margin: 0 2px; border: 0; background: none; color: var(--accent); cursor: pointer; line-height: 1; border-radius: 4px; }
+.dice:hover, .dice:focus-visible, .dice-svg:hover, .dice-svg:focus-visible { color: var(--ink); outline: 1px solid var(--accent); outline-offset: 1px; }
+.dice-svg { color: var(--accent); cursor: pointer; }
+.dice-glyph { display: inline-block; vertical-align: middle; }
+.dice-glyph.legend { color: var(--accent); margin-right: 2px; }
+.dice-legend { display: inline; }
+#dice-pop { position: fixed; z-index: 60; max-width: min(320px, calc(100vw - 16px)); padding: 10px 12px; background: var(--raised); color: var(--ink); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45); font-size: var(--step--1, 0.85rem); }
+#dice-pop ul { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 4px; }
+#dice-pop li { display: grid; grid-template-columns: minmax(0, 1fr) 70px 46px; gap: 8px; align-items: center; }
+#dice-pop .bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
+#dice-pop .bar i { display: block; height: 100%; background: var(--accent); }
+#dice-pop .p { font-family: var(--font-data); text-align: right; }
+#dice-pop p { margin: 6px 0 0; color: var(--muted); }
#map .node rect { stroke: color-mix(in srgb, var(--ink) 40%, transparent); stroke-width: 0.6; cursor: pointer; }
#map .node.sel rect { stroke: var(--accent); stroke-width: 2.4; }
#map .node.dim { opacity: 0.35; }
@@ -749,6 +763,7 @@ adjusted OR = exp(βⱼ), 95% CI = exp(βⱼ ± 1.96·SEⱼ)
+