Regions: each new town favours its gathering trades, common materials most
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ad5317e554
commit
01df1924c0
4 changed files with 102 additions and 15 deletions
4
app.py
4
app.py
|
|
@ -152,6 +152,8 @@ def player_view(world: dict, player: dict, now: float) -> dict:
|
|||
view["recon_gain"] = {action["id"]: game.recon_gain(world, player, action) for action in game.ACTIONS
|
||||
if action.get("special") == "recon"}
|
||||
level = game.skill_level(player, "firekeeping")
|
||||
view["region_yield"] = {action["id"]: round(game.region_yield(world, action) - 1, 3) for action in game.ACTIONS
|
||||
if game.region_yield(world, action) > 1}
|
||||
view["firekeeping"] = {"minutes": game.fire_minutes(level), "bank": game.fire_bank(level)}
|
||||
# Inputs as the fires leave them: a lit fire pays the log.
|
||||
view["fuelled"] = {action["id"]: game.fire_inputs(world, action) for action in game.ACTIONS if action.get("fire")}
|
||||
|
|
@ -363,7 +365,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||
pouch = body.get("pouch")
|
||||
return game.travel(world, player, str(body.get("to")), pouch if isinstance(pouch, dict) else {}, now)
|
||||
if path == "/api/charter":
|
||||
return game.propose_charter(world, player, body.get("name"), now)
|
||||
return game.propose_charter(world, player, body.get("name"), body.get("region"), now)
|
||||
if path == "/api/charter/sign":
|
||||
return game.sign_charter(world, player, now)
|
||||
if path == "/api/charter/cancel":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue