Bank: drink all potions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bb56d618df
commit
2597a1d7e7
4 changed files with 28 additions and 7 deletions
3
app.py
3
app.py
|
|
@ -482,7 +482,8 @@ class Handler(BaseHTTPRequestHandler):
|
|||
if path == "/api/statue":
|
||||
return game.carve_statue(world, player, str(body.get("of")), now)
|
||||
if path == "/api/potion":
|
||||
return game.use_potion(player, str(body.get("item")))
|
||||
qty = body.get("qty", 1)
|
||||
return game.use_potion(player, str(body.get("item")), qty if qty == "all" or isinstance(qty, int) else -1)
|
||||
if path == "/api/prayers":
|
||||
ids = body.get("ids")
|
||||
return game.set_prayers(player, ids) if isinstance(ids, list) else "Bad request"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue