Kingdom: two-town fixes, patch notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
01df1924c0
commit
2b04db3b31
3 changed files with 39 additions and 3 deletions
16
game.py
16
game.py
|
|
@ -2159,7 +2159,7 @@ def last_threat(world: dict) -> dict | None:
|
|||
def unseen_threat(world: dict, player: dict) -> dict | None:
|
||||
"""The latest raid or dragon attack this player hasn't watched yet, if it happened while they were here."""
|
||||
event = last_threat(world)
|
||||
if event and event["id"] > player.get("seen_threat", 0) and event["resolved"] >= player["joined"]:
|
||||
if event and event["id"] > player.get("seen_threat", 0) and event["resolved"] >= max(player["joined"], player.get("arrived", 0)):
|
||||
return event
|
||||
return None
|
||||
|
||||
|
|
@ -2260,6 +2260,8 @@ def upper_first(text: str) -> str:
|
|||
|
||||
|
||||
def log(world: dict, now: float, kind: str, text: str, who: str | None = None) -> None:
|
||||
if world.here != HOME_CITY:
|
||||
text = f"{world['city']['name']}: {text}"
|
||||
world["ledger"].append({"at": now, "kind": kind, "text": text, "who": who})
|
||||
del world["ledger"][:-MAX_LOG]
|
||||
|
||||
|
|
@ -3198,7 +3200,7 @@ def fires_view(world: dict, now: float) -> dict:
|
|||
users = {}
|
||||
for player in world["players"].values():
|
||||
action = player["action"] and ACTION_BY_ID.get(player["action"]["id"])
|
||||
if action and (action.get("fire") or action.get("tend")):
|
||||
if action and (action.get("fire") or action.get("tend")) and player["at"] == world.here and not player["travel"]:
|
||||
users.setdefault(action.get("fire") or action["tend"], []).append(
|
||||
{"id": player["id"], "name": player["name"], "action": action["id"]})
|
||||
return {key: {**fire, "heat": heat(world, key), "speed": speed(world), "users": users.get(key, [])}
|
||||
|
|
@ -4610,6 +4612,8 @@ def propose_charter(world: World, player: dict, name, region, now: float) -> str
|
|||
return "A charter is already waiting to be signed"
|
||||
if len(world.doc["cities"]) >= MAX_CITIES:
|
||||
return "The kingdom can't hold another town yet"
|
||||
if not _slug(name):
|
||||
return "A town's name takes 3 to 24 letters"
|
||||
if _slug(name) in world.doc["cities"]:
|
||||
return "There's already a town by that name"
|
||||
error = _founding_short(world)
|
||||
|
|
@ -7183,6 +7187,14 @@ ORDER_RECIPES, ORDER_RAW = _order_sources()
|
|||
# What changed, shown on the Patch notes page. Newest first; every shipped change adds a
|
||||
# line here (new / balance / fix), and a new release a new entry on top.
|
||||
PATCH_NOTES = [
|
||||
{"date": "2026-11-04", "title": "Kingdom", "notes": [
|
||||
("new", "Kingdom: found a new town. Needs a city, a charter and a second signature. Costs 20 settlers, 5,000 gold, 200 provisions."),
|
||||
("new", "Regions: ⛰️ mining, 🌲 woodcutting + hunting, 🌊 fishing, 🌾 farming. Up to +100% yield on basic materials, grows with the town. One town per region."),
|
||||
("new", "Travel between towns: 12 min, no work on the road. Pouch: 6 items, 100 each."),
|
||||
("new", "Banks and work orders are per town. Shared fights need the same town. Raids strike every town in the same hour."),
|
||||
("new", "Garrison: be there before the gates close."),
|
||||
("balance", "⚠️ From the raid after next, a lost raid loots banks in that town: 6-21%. Strongbox slots protect their share. Worn gear and pouches are safe."),
|
||||
]},
|
||||
{"date": "2026-11-04", "title": "Crucible", "notes": [
|
||||
("new", "Crucible: 5th fire, for silver and gold bars."),
|
||||
("balance", "Gold bar: +1 willow log. White flame or hotter pays it."),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue