Dice beside every roll; click them for the odds of each outcome
CI / test (pull_request) Successful in 44s
CI / test (pull_request) Successful in 44s
- site/atlas/dice.js: a pair of dice marks a step the game decides at random (not the rider's choice). Clicking (or Enter on) the dice opens a small popover with every outcome of that roll and its odds; Escape, scrolling or a click elsewhere closes it. Dice.html for text, Dice.svg for the maps, Dice.legend for the keys. - Route map: dice after each "game roll" heading (first sighting, encounter), with the share of riders at each outcome in the runs shown. Legend: dice and gold headings = steps the game rolls. - Valley map: dice on the "roll" / "shadow" labels of a route (the model's odds given the route so far), on the "First dragon" step of the route list, in the first-sighting card, on the guide's own roll notes (no odds: the guide gives none) and on the bot's answers that led to different screens. Legend under the route key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
+10
-2
@@ -272,7 +272,15 @@
|
||||
const chance = s.chance;
|
||||
const t = svgEl("text", { x: colX(i), y: 18, class: "stage-label" + (chance ? " stage-chance" : "") }, svg);
|
||||
t.textContent = s.label;
|
||||
if (chance) { const r = svgEl("text", { x: colX(i), y: 31, class: "stage-label stage-chance" }, svg); r.textContent = "game roll"; }
|
||||
if (chance) {
|
||||
const r = svgEl("text", { x: colX(i), y: 31, class: "stage-label stage-chance" }, svg);
|
||||
r.textContent = "game roll";
|
||||
const here = G.nodes.filter((n) => n.stage === i), tot = here.reduce((a, n) => a + n.n, 0) || 1;
|
||||
const w = r.getComputedTextLength ? r.getComputedTextLength() : 70; // the headings are left-aligned
|
||||
Dice.svg(svg, colX(i) + w + 15, 27, { title: `${s.label}: the game's roll`, n: tot,
|
||||
options: here.map((n) => [n.value, n.n / tot]),
|
||||
note: "Share of riders who reached this step, in the runs shown. The game decides it; earlier choices can shift the odds." });
|
||||
}
|
||||
});
|
||||
|
||||
// links
|
||||
@@ -342,7 +350,7 @@
|
||||
<span>${state.widthMode === "traffic" ? "Band width = number of runs" : "Line width = chance of the outcome"}</span>
|
||||
<span style="display:inline-flex;gap:6px;align-items:center">0% <span class="ramp" style="background:linear-gradient(90deg, ${low}, ${tcol})"></span> ${pct(pmax, 0)}</span>
|
||||
<span>Grey = fewer than ${state.minN} runs</span>
|
||||
<span><span style="color:var(--accent)">Gold headings</span> = steps the game rolls, not you</span>`;
|
||||
<span>${Dice.legend('and <span style="color:var(--accent)">gold headings</span> = steps the game rolls at random, not your choice. Click the dice for the odds of each outcome.')}</span>`;
|
||||
}
|
||||
|
||||
function renderBestRoutes() {
|
||||
|
||||
Reference in New Issue
Block a user