Dungeon loot: patterns, masterworks, relics, uniques
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
60b446acfd
commit
8afcba79fc
8 changed files with 358 additions and 18 deletions
6
app.py
6
app.py
|
|
@ -117,7 +117,9 @@ def player_view(world: dict, player: dict, now: float) -> dict:
|
|||
me = game.fighter(player, game.blessing(player), game.potion_effect(player, "combat"))
|
||||
view["fighter"] = {"max_hit": me["max_hit"], "accuracy": round(me["accuracy"]), "evasion": me["evasion"],
|
||||
"crit": me["crit"], "interval": me["interval"], "block": me["block"], "damage": me["damage"],
|
||||
"role": me["role"], "abilities": me["abilities"], "style": me["style"]}
|
||||
"role": me["role"], "abilities": me["abilities"], "style": me["style"], "mods": me["mods"],
|
||||
"boosts": {ab: [game.ITEMS[i]["name"] for i in player["equip"].values() if i and ab in game.ITEMS[i].get("mods", {})]
|
||||
for ab in me["mods"]}}
|
||||
view["health_potion"] = game.health_potion(player)
|
||||
view["perk_costs"] = {perk: game.perk_cost(player, perk) for perk in player["perks"]}
|
||||
view["rent_cost"] = game.rent_cost(player)
|
||||
|
|
@ -363,6 +365,8 @@ class Handler(BaseHTTPRequestHandler):
|
|||
return game.press(world, player, str(body.get("id")), now, str(target) if target else None)
|
||||
if path == "/api/target":
|
||||
return game.set_fight_target(world, player, str(body.get("id")), now)
|
||||
if path == "/api/learn":
|
||||
return game.learn_pattern(player, str(body.get("item")))
|
||||
if path == "/api/pull":
|
||||
return game.pull_now(world, player, now)
|
||||
if path == "/api/manual":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue