Combat rework: damage types, races with variants, armour weights, tailoring
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a35bcd6512
commit
ba7556de4d
7 changed files with 715 additions and 254 deletions
3
app.py
3
app.py
|
|
@ -98,6 +98,8 @@ def player_view(world: dict, player: dict, now: float) -> dict:
|
|||
view["max_hp"] = game.max_hp(player)
|
||||
view["armour"] = game.armour(player)
|
||||
view["reduction"] = round(game.damage_reduction(player), 3)
|
||||
view["ward"] = game.magic_ward(player)
|
||||
view["ward_reduction"] = round(game.reduction(game.magic_ward(player)), 3)
|
||||
view["edible"] = game.edible(player)
|
||||
view["blessing"] = game.blessing(player)
|
||||
view["fight_odds"] = {a["id"]: game.fight_odds(player, a) for a in game.ACTIONS if "enemy" in a}
|
||||
|
|
@ -170,6 +172,7 @@ def roster(world: dict, now: float) -> list[dict]:
|
|||
"xp": player["xp"], "equip": player["equip"], "joined": player["joined"],
|
||||
"hp": int(player["hp"]), "max_hp": game.max_hp(player), "power": game.combat_power(player),
|
||||
"armour": game.armour(player), "reduction": round(game.damage_reduction(player), 3),
|
||||
"ward": game.magic_ward(player), "ward_reduction": round(game.reduction(game.magic_ward(player)), 3),
|
||||
"favour": player["favour"],
|
||||
"id": player["id"], "name": player["name"], "cls": player["cls"],
|
||||
"total": sum(game.skill_level(player, skill) for skill in game.SKILL_IDS),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue