Favour: price gear from full recipe, flatten leather

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-27 22:50:37 +00:00
parent 6b2f6c649d
commit d564164edf

20
game.py
View file

@ -193,14 +193,15 @@ def _fuelled(inputs: dict, tier: int) -> dict:
# Every tier's hide comes from Hunting. raw hide (id, name, icon, value), leather (id, name, value), # Every tier's hide comes from Hunting. raw hide (id, name, icon, value), leather (id, name, value),
# armour id prefix, armour name prefix # armour id prefix, armour name prefix
# A hunt is worth about what a log or ore of its tier is, for the time it takes.
LEATHERS = [ LEATHERS = [
(("hide", "Hide", "🟫", 3), ("leather", "Leather", 5), "leather", "Leather"), (("hide", "Hide", "🟫", 3), ("leather", "Leather", 5), "leather", "Leather"),
(("boar_hide", "Boar hide", "🐗", 8), ("hard_leather", "Hard leather", 12), "hard_leather", "Hard leather"), (("boar_hide", "Boar hide", "🐗", 5), ("hard_leather", "Hard leather", 8), "hard_leather", "Hard leather"),
(("bear_pelt", "Bear pelt", "🐻", 16), ("bear_leather", "Bear leather", 24), "bear_leather", "Bear leather"), (("bear_pelt", "Bear pelt", "🐻", 9), ("bear_leather", "Bear leather", 14), "bear_leather", "Bear leather"),
(("elk_hide", "Elk hide", "🦌", 35), ("elk_leather", "Elk leather", 50), "elk_leather", "Elk leather"), (("elk_hide", "Elk hide", "🦌", 16), ("elk_leather", "Elk leather", 24), "elk_leather", "Elk leather"),
(("sabrecat_pelt", "Sabrecat pelt", "🐆", 60), ("sabrecat_leather", "Sabrecat leather", 85), (("sabrecat_pelt", "Sabrecat pelt", "🐆", 32), ("sabrecat_leather", "Sabrecat leather", 48),
"sabrecat_leather", "Sabrecat leather"), "sabrecat_leather", "Sabrecat leather"),
(("mammoth_hide", "Mammoth hide", "🦣", 100), ("mammoth_leather", "Mammoth leather", 140), (("mammoth_hide", "Mammoth hide", "🦣", 56), ("mammoth_leather", "Mammoth leather", 85),
"mammoth_leather", "Mammoth leather"), "mammoth_leather", "Mammoth leather"),
] ]
# piece suffix, slot, noun, leather used, level above the tier, icon # piece suffix, slot, noun, leather used, level above the tier, icon
@ -5016,6 +5017,14 @@ for _weapon in _weapon_actions():
for _jewel in [*_jewel_actions(), *_storage_actions()]: for _jewel in [*_jewel_actions(), *_storage_actions()]:
ACTIONS.append(_jewel) ACTIONS.append(_jewel)
ACTION_BY_ID[_jewel["id"]] = _jewel ACTION_BY_ID[_jewel["id"]] = _jewel
# Gear and guard kit are worth everything that went into them, trophies and reagents
# included, so crafting one never loses its maker favour or gold.
GEAR_MARKUP = 1.2
for _craft in ACTIONS:
_made = next(iter(_craft["outputs"]), None)
if _made in ITEMS and (ITEMS[_made].get("slot") in ("weapon", "shield", "helmet", "body", "legs")
or "kit" in ITEMS[_made]):
ITEMS[_made]["value"] = round(sum(ITEMS[i]["value"] * q for i, q in _craft["inputs"].items()) * GEAR_MARKUP)
_dungeon_loot() # masterworks are reforged from all of the above _dungeon_loot() # masterworks are reforged from all of the above
FITTING_BY_ID = {} FITTING_BY_ID = {}
for _id, _name, _building, _blevel, _level, _inputs, _effect, _glyph, _tint in FITTINGS: for _id, _name, _building, _blevel, _level, _inputs, _effect, _glyph, _tint in FITTINGS:
@ -6280,6 +6289,7 @@ ORDER_RECIPES, ORDER_RAW = _order_sources()
# line here (new / balance / fix), and a new release a new entry on top. # line here (new / balance / fix), and a new release a new entry on top.
PATCH_NOTES = [ PATCH_NOTES = [
{"date": "2026-10-27", "title": "Prayer", "notes": [ {"date": "2026-10-27", "title": "Prayer", "notes": [
("balance", "Rebalanced favour values of items"),
("balance", "Prospecting: 3 ore per try (was 5), 50% gem chance (was 15%)."), ("balance", "Prospecting: 3 ore per try (was 5), 50% gem chance (was 15%)."),
("new", "Dungeons: runs go on while anyone is watching. Members who look away fight on auto."), ("new", "Dungeons: runs go on while anyone is watching. Members who look away fight on auto."),
("new", "Group stays in lobby after finishing dungeon"), ("new", "Group stays in lobby after finishing dungeon"),