War council: guards march to other towns, one fight, then home; main assault
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2b04db3b31
commit
a78274803b
5 changed files with 470 additions and 18 deletions
6
app.py
6
app.py
|
|
@ -229,7 +229,7 @@ def roster(world: dict, now: float) -> list[dict]:
|
|||
return sorted(people, key=lambda p: -p["donated"])
|
||||
|
||||
|
||||
ROAD_ROUTES = ("/api/seen", "/api/pin", "/api/track", "/api/board", "/api/board/delete", "/api/charter/sign", "/api/charter/cancel") # what you can still do on the road
|
||||
ROAD_ROUTES = ("/api/council/propose", "/api/council/vote", "/api/seen", "/api/pin", "/api/track", "/api/board", "/api/board/delete", "/api/charter/sign", "/api/charter/cancel") # what you can still do on the road
|
||||
|
||||
|
||||
class Handler(BaseHTTPRequestHandler):
|
||||
|
|
@ -364,6 +364,10 @@ class Handler(BaseHTTPRequestHandler):
|
|||
if path == "/api/travel":
|
||||
pouch = body.get("pouch")
|
||||
return game.travel(world, player, str(body.get("to")), pouch if isinstance(pouch, dict) else {}, now)
|
||||
if path == "/api/council/propose":
|
||||
return game.propose_march(world, player, str(body.get("from")), str(body.get("to")), body.get("guards"), now)
|
||||
if path == "/api/council/vote":
|
||||
return game.vote_march(world, player, body.get("id"), bool(body.get("yes")), now)
|
||||
if path == "/api/charter":
|
||||
return game.propose_charter(world, player, body.get("name"), body.get("region"), now)
|
||||
if path == "/api/charter/sign":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue