From 67a1ab876a2e2ed9637766686c5fd145ad971969 Mon Sep 17 00:00:00 2001 From: rope Date: Sun, 25 Oct 2026 20:07:50 +0000 Subject: [PATCH] Fix client crash from misplaced achievements hunk Co-Authored-By: Claude Opus 5.5 --- game.py | 40 ++++++++++++++++++++-------------------- static/app.js | 8 ++++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/game.py b/game.py index 29450a0..43e473c 100644 --- a/game.py +++ b/game.py @@ -5616,24 +5616,6 @@ def monuments_view(world: dict) -> dict: return {"funds": city["monuments"], "built": city["built"], "carving": city["carving"]} -# --- favour -------------------------------------------------------------- - -MASTER_BUILDER_LABOUR = 50 # boosted labour per hire: doubled labour and XP for whoever works it -MASTER_BUILDER_FAVOUR = 150 # +50% for every further hire on the same site -INFORMANT_FAVOUR = 250 -# Drilling: fighters train the townsfolk before a raid. A full drill takes as -# many points as full intel on the same threat, so fighters and scouts put in -# about the same time; the defence it's worth grows with the population. -GUARD_POSTS_BASE = 10 # guard posts with no barracks... -GUARD_POSTS = 20 # ...and per barracks level, never more than half the townsfolk -GUARD_WAGE = 60 # gold per guard per threat, paid into the chest ahead of time -DRILL_PER_ACTION = 1.0 # drill points per session, +25% every 20 combat levels -DRILL_XP = 12 # combat XP per drill point -DRILL_SHARE = 1.0 # defence of a fully drilled militia, per townsperson -DRILL_SERGEANT_POINTS = 30 # boosted drilling per hire: doubled points and XP -DRILL_SERGEANT_FAVOUR = 150 # +50% for every further hire against the same threat - - # --- achievements ---------------------------------------------------------------- # What's left to unlock. Read off what you already have, never a source of anything: # patterns learned, uniques found, titles, looks, your home. @@ -5693,6 +5675,24 @@ def achievements(player: dict) -> list[dict]: ] +# --- favour -------------------------------------------------------------- + +MASTER_BUILDER_LABOUR = 50 # boosted labour per hire: doubled labour and XP for whoever works it +MASTER_BUILDER_FAVOUR = 150 # +50% for every further hire on the same site +INFORMANT_FAVOUR = 250 +# Drilling: fighters train the townsfolk before a raid. A full drill takes as +# many points as full intel on the same threat, so fighters and scouts put in +# about the same time; the defence it's worth grows with the population. +GUARD_POSTS_BASE = 10 # guard posts with no barracks... +GUARD_POSTS = 20 # ...and per barracks level, never more than half the townsfolk +GUARD_WAGE = 60 # gold per guard per threat, paid into the chest ahead of time +DRILL_PER_ACTION = 1.0 # drill points per session, +25% every 20 combat levels +DRILL_XP = 12 # combat XP per drill point +DRILL_SHARE = 1.0 # defence of a fully drilled militia, per townsperson +DRILL_SERGEANT_POINTS = 30 # boosted drilling per hire: doubled points and XP +DRILL_SERGEANT_FAVOUR = 150 # +50% for every further hire against the same threat + + def drill_per_action(player: dict) -> float: return DRILL_PER_ACTION * (1 + 0.25 * (skill_level(player, "combat") // 20)) * ware(player, "drill", "combat") @@ -6063,6 +6063,8 @@ ORDER_RECIPES, ORDER_RAW = _order_sources() # line here (new / balance / fix), and a new release a new entry on top. PATCH_NOTES = [ {"date": "2026-10-25", "title": "Titles", "notes": [ + ("new", "🏆 Achievements (under You): 127 to collect. Masterwork patterns per dungeon (7 each), the 7 uniques, titles, " + "boss emblems, caravan looks, home. Tap an icon for what it is and how to get it. Nothing is awarded there, it only keeps track."), ("new", "Fishing 50 also earns a second title: Master baiter."), ("balance", "Boiling hide glue now uses the kitchen fire: while it's lit, glue costs no logs."), ("fix", "Dungeons wait for the leader to press Start, so groups of 3 and 4 can form. No one can join once it starts."), @@ -6081,8 +6083,6 @@ PATCH_NOTES = [ "lens, Wyrmscale quiver. Abilities it changes get a ✦."), ("new", "Choose when you eat between fights: below 25 / 50 / 75% of your HP, always, or never (the food slot, " "under \"Eat below\"). Default 50%: above it you just rest, so a scratch doesn't cost food."), - ("new", "🏆 Achievements (under You): 127 to collect. Masterwork patterns per dungeon (7 each), the 7 uniques, titles, " - "boss emblems, caravan looks, home. Tap an icon for what it is and how to get it. Nothing is awarded there, it only keeps track."), ("new", "Tapping an enemy or ally switches at once, and your next press goes to them: tap, then interrupt, " "without waiting."), ("new", "HP bars show what was just lost, with each fighter's last hit or heal by their HP."), diff --git a/static/app.js b/static/app.js index 7afd17b..8121ed5 100644 --- a/static/app.js +++ b/static/app.js @@ -2447,6 +2447,10 @@ document.addEventListener("click", (e) => { dollPick = dollPick === d.doll ? null : d.doll; return render(); } + if (d.ach) { + achPick = achPick === d.ach ? null : d.ach; + return render(); + } if ("select" in d) { selected = d.select || null; render(); @@ -2662,7 +2666,3 @@ document.addEventListener("visibilitychange", () => { if (!document.hidden) refr }, 500); requestAnimationFrame(loop); })(); - if (d.ach) { - achPick = achPick === d.ach ? null : d.ach; - return render(); - }