War council: 15 min votes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
852c70af01
commit
e3113edcf4
1 changed files with 13 additions and 4 deletions
17
game.py
17
game.py
|
|
@ -1724,7 +1724,7 @@ RAID_TRAITS = ["lightly armoured, heavy on archers", "mounted and fast, few bows
|
||||||
|
|
||||||
# --- world ---------------------------------------------------------------
|
# --- world ---------------------------------------------------------------
|
||||||
|
|
||||||
WORLD_VERSION = 46
|
WORLD_VERSION = 47
|
||||||
HOME_CITY = "guildhall"
|
HOME_CITY = "guildhall"
|
||||||
CITY_KEYS = ("events", "next_event_at", "next_minor_at", "next_hardship_at", "next_fortune_at", "caravan", "orders")
|
CITY_KEYS = ("events", "next_event_at", "next_minor_at", "next_hardship_at", "next_fortune_at", "caravan", "orders")
|
||||||
TRAVEL_TIME = 12 * 60 # game seconds on the road between two towns
|
TRAVEL_TIME = 12 * 60 # game seconds on the road between two towns
|
||||||
|
|
@ -1742,7 +1742,7 @@ REGION_YIELD = [1.0, 0.75, 0.5, 0.3, 0.2, 0.1] # more per trip at each materia
|
||||||
TOWN_SCALE = [0.5, 0.7, 0.85, 1.0] # how much of that a hamlet, village, town and city get
|
TOWN_SCALE = [0.5, 0.7, 0.85, 1.0] # how much of that a hamlet, village, town and city get
|
||||||
MAX_CITIES = 1 + len(REGIONS)
|
MAX_CITIES = 1 + len(REGIONS)
|
||||||
MARCH_TIME = 10 * HOUR # guards on the road, as a unit, between any two towns (a road comes with each founding)
|
MARCH_TIME = 10 * HOUR # guards on the road, as a unit, between any two towns (a road comes with each founding)
|
||||||
VOTE_TIME = HOUR # how long the war council has before the votes cast decide
|
VOTE_TIME = HOUR / 4 # how long the war council has before the votes cast decide
|
||||||
MAIN_ASSAULT = (1.5, 0.75) # how the bandits weigh their main target against the rest, kingdom total unchanged
|
MAIN_ASSAULT = (1.5, 0.75) # how the bandits weigh their main target against the rest, kingdom total unchanged
|
||||||
MAIN_TIER = 2 # a town has to be this big to draw it, and it takes two such towns
|
MAIN_TIER = 2 # a town has to be this big to draw it, and it takes two such towns
|
||||||
# Caravans: players crew a wagon train. Each road level, at either end, helps every caravan on that road.
|
# Caravans: players crew a wagon train. Each road level, at either end, helps every caravan on that road.
|
||||||
|
|
@ -2151,6 +2151,12 @@ def migrate(world: dict, now: float | None = None) -> World:
|
||||||
for player in world["players"].values():
|
for player in world["players"].values():
|
||||||
player["equip"].setdefault("tool_reconnaissance", None)
|
player["equip"].setdefault("tool_reconnaissance", None)
|
||||||
world["version"] = 46
|
world["version"] = 46
|
||||||
|
if world["version"] < 47:
|
||||||
|
# War council votes went from 1h to 15 min: open votes close on the new clock.
|
||||||
|
for proposal in world["council"]:
|
||||||
|
if proposal["status"] == "open":
|
||||||
|
proposal["ends"] = min(proposal["ends"], proposal["at"] + VOTE_TIME / speed(world))
|
||||||
|
world["version"] = 47
|
||||||
return world
|
return world
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -4849,7 +4855,7 @@ def vote_march(world: World, player: dict, proposal_id, yes: bool, now: float) -
|
||||||
|
|
||||||
|
|
||||||
def _count_votes(world: World, proposal: dict, now: float) -> None:
|
def _count_votes(world: World, proposal: dict, now: float) -> None:
|
||||||
"""A majority of everyone active settles it at once. Otherwise the votes cast decide when the hour is up:
|
"""A majority of everyone active settles it at once. Otherwise the votes cast decide when time is up:
|
||||||
not voting never blocks a march."""
|
not voting never blocks a march."""
|
||||||
active = sum(1 for p in world["players"].values() if p["last_active"] > now - 2 * DAY / speed(world))
|
active = sum(1 for p in world["players"].values() if p["last_active"] > now - 2 * DAY / speed(world))
|
||||||
if 2 * len(proposal["yes"]) > active:
|
if 2 * len(proposal["yes"]) > active:
|
||||||
|
|
@ -5792,7 +5798,7 @@ def _pay_guards(world: dict, report: dict) -> None:
|
||||||
|
|
||||||
|
|
||||||
def _muster_tick(world: World, now: float, rng: random.Random | None = None) -> bool:
|
def _muster_tick(world: World, now: float, rng: random.Random | None = None) -> bool:
|
||||||
"""Close the votes whose hour is up and move the companies and caravans on the road."""
|
"""Close the votes whose time is up and move the companies and caravans on the road."""
|
||||||
changed = _caravan_road_tick(world, now, rng or random.Random())
|
changed = _caravan_road_tick(world, now, rng or random.Random())
|
||||||
for proposal in world["council"]:
|
for proposal in world["council"]:
|
||||||
if proposal["status"] == "open" and now >= proposal["ends"]:
|
if proposal["status"] == "open" and now >= proposal["ends"]:
|
||||||
|
|
@ -7941,6 +7947,9 @@ ORDER_RECIPES, ORDER_RAW = _order_sources()
|
||||||
# What changed, shown on the Patch notes page. Newest first; every shipped change adds a
|
# 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.
|
# line here (new / balance / fix), and a new release a new entry on top.
|
||||||
PATCH_NOTES = [
|
PATCH_NOTES = [
|
||||||
|
{"date": "2026-11-26", "title": "War council", "notes": [
|
||||||
|
("balance", "War council votes last 15 min (was 1h)."),
|
||||||
|
]},
|
||||||
{"date": "2026-11-12", "title": "Reconnaissance", "notes": [
|
{"date": "2026-11-12", "title": "Reconnaissance", "notes": [
|
||||||
("new", "Recon: 4 new scouting actions, Lv 30 / 45 / 60 / 75, 3 / 5 / 8 / 10 recon each."),
|
("new", "Recon: 4 new scouting actions, Lv 30 / 45 / 60 / 75, 3 / 5 / 8 / 10 recon each."),
|
||||||
("new", "Spyglass: recon tool, smithed from every metal, 15–60% faster scouting."),
|
("new", "Spyglass: recon tool, smithed from every metal, 15–60% faster scouting."),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue