atagen

jelq

public

an http based roguelike rpg about jelqing

Star0
Watch0

Commit beabb5985f4a

tarball

atagen <boss@atagen.co>2026-10-14 11:31 UTC

1 file changed+10-1
ui: colour the old EQ status by whether the turn moved it towards Ideal
Modified file: src/ui.html+10 additions−1 deletions
@@ -73,6 +73,7 @@ const STATS = [
7373 const MEASURED = ["x-length", "Length"];
7474 const GROWTH = new Set(["x-length", "x-self-reported-length", "x-girth", "x-foreskin"]);
7575 const BETTER = { "x-length": 1, "x-self-reported-length": 1, "x-girth": 1, "x-foreskin": 1, "x-friction": -1, "x-stamina": 1, "x-suspicion": -1, "x-shame": -1, "x-cash": 1, "x-floor": 1 };
76+const AROUSAL = ["Flaccid", "Cold", "Warm", "Ideal", "Swollen", "Throbbing", "Straining", "Imminent"];
7677 let lastStats = {};
7778 const QUIET = new Set(["link", "set-cookie", "server", "x-powered-by", "cache-control", "content-length", "content-type", "date"].concat(STATS.map(s => s[0]), MEASURED[0]));
7879
@@ -227,10 +228,18 @@ function renderStats(headers) {
227228 lastStats = headers || {};
228229 }
229230
231+function fromIdeal(arousal) {
232+ return arousal === "Priapic" ? AROUSAL.length : Math.abs(AROUSAL.indexOf(arousal) - AROUSAL.indexOf("Ideal"));
233+}
234+
230235 function change(name, value) {
231236 const before = lastStats[name];
232237 if (before === undefined || before === value) return null;
233- if (name === "x-eq") return el("small", { textContent: "(was " + before + ")" });
238+ if (name === "x-eq") {
239+ const closer = Math.sign(fromIdeal(before) - fromIdeal(value));
240+ const was = el("b", { textContent: before, style: closer ? "color: " + (closer > 0 ? "green" : "red") : "" });
241+ return el("small", {}, "(was ", was, ")");
242+ }
234243 const delta = parseFloat(value) - parseFloat(before);
235244 if (!(Math.abs(delta) >= 0.005)) return null;
236245 const text = (delta > 0 ? "+" : "") + (GROWTH.has(name) ? delta.toFixed(2) : delta);