Valley map: cadets at the bully fight, the wounded cadet, and the thorn bush
Original silhouettes built from the same parts as the dragons: your squadmate with a raised sword facing the two bullies (sword and dagger), the wounded cadet on the ground, and a thorny bush at the hour's walk. Each has a short hover note and fades when a chosen route does not pass it. 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
1b0ef9a2c1
commit
2eace69d7d
+26
-1
@@ -235,6 +235,30 @@
|
||||
});
|
||||
}
|
||||
|
||||
/* ---------- the people (and the thorn) of the valley ---------- */
|
||||
const SCENERY = [
|
||||
{ at: "bully", fig: "defender", dx: 6, sc: 0.42, tip: "The bully fight", text: "Your squadmate holds off two cadets who have bullied them since Parapet. Help them, or walk away." },
|
||||
{ at: "bully", fig: "lunging", dx: 30, sc: 0.42, tip: "The bully fight", text: "The bigger cadet swings a sword; the smaller one has a dagger ready to throw." },
|
||||
{ at: "bully", fig: "throwing", dx: 58, sc: 0.42, tip: "The bully fight", text: "Assess first, even the numbers, or put yourself in the middle. Then decide the bullies' fate." },
|
||||
{ at: "wounded", fig: "lying", dx: -72, dy: 4, sc: 0.56, tip: "The wounded cadet", text: "Ignore the scream and you find a badly wounded cadet. Tie a tourniquet, leave them, or take their weapons." },
|
||||
{ at: "hour", fig: "thorns", dx: -66, dy: 6, sc: 0.44, tip: "An hour's walk", text: "No dragon for an hour, and a thorn cuts the back of your hand. Then: climb the tallest tree, or walk on to the valley centre." },
|
||||
];
|
||||
function drawScenery(g, onRoute) {
|
||||
SCENERY.forEach((sc) => {
|
||||
const P = L[sc.at];
|
||||
if (!P) return;
|
||||
const faded = st.colour && !onRoute.has(sc.at);
|
||||
const x = P.x + (sc.dx || 0) - 50 * sc.sc, y = P.y + (sc.dy || 0) - 136 * sc.sc;
|
||||
const gg = el("g", { class: "ex-scene", transform: `translate(${x} ${y}) scale(${sc.sc})`, opacity: faded ? 0.35 : 0.88 }, g);
|
||||
gg.innerHTML = D.figure(sc.fig, { fill: sc.fig === "thorns" ? "#4a3a22" : PAPER.ink, flip: !!sc.flip });
|
||||
el("rect", { x: 0, y: 0, width: 100, height: 140, fill: "transparent" }, gg);
|
||||
const html = `<b>${esc(sc.tip)}</b><br>${esc(sc.text)}`;
|
||||
gg.addEventListener("mouseenter", (e) => showTip(e, html));
|
||||
gg.addEventListener("mousemove", (e) => moveTip(e));
|
||||
gg.addEventListener("mouseleave", hideTip);
|
||||
});
|
||||
}
|
||||
|
||||
function drawLandmarks(g, onRoute) {
|
||||
const ids = new Set(LANDMARKS);
|
||||
onRoute.forEach((id) => { if (L[id] && L[id].kind !== "dragon") ids.add(id); });
|
||||
@@ -455,7 +479,7 @@
|
||||
el("rect", { x: 0, y: 0, width: 1000, height: 790, fill: "#f6e6c4", "fill-opacity": st.colour ? 0.32 : 0.12 }, svg);
|
||||
const gTraffic = el("g", { filter: "url(#ex-brush)" }, svg);
|
||||
const gRoute = el("g", { filter: "url(#ex-brush)" }, svg);
|
||||
const gLand = el("g", {}, svg), gDrag = el("g", {}, svg), gLab = el("g", {}, svg);
|
||||
const gLand = el("g", {}, svg), gScene = el("g", {}, svg), gDrag = el("g", {}, svg), gLab = el("g", {}, svg);
|
||||
if (st.traffic) drawTraffic(gTraffic);
|
||||
let routes = [], onRoute = new Set();
|
||||
if (st.colour && st.policy) {
|
||||
@@ -468,6 +492,7 @@
|
||||
onRoute = drawRoutes(gRoute, gLab, routes);
|
||||
}
|
||||
drawLandmarks(gLand, onRoute);
|
||||
drawScenery(gScene, onRoute);
|
||||
drawDragons(gDrag, !!st.colour);
|
||||
// the paper texture and vignette go on top
|
||||
const fin = document.createElementNS(NS, "svg");
|
||||
|
||||
Reference in New Issue
Block a user