Tools on the tier ladder
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0f2b29e67e
commit
0a73f65f20
3 changed files with 6 additions and 7 deletions
|
|
@ -71,8 +71,8 @@ Alpha. One season, bandit raids plus two friendly events, six buildings.
|
||||||
trousers and jerkin; every cloth tier a hood, leggings and robe. Higher
|
trousers and jerkin; every cloth tier a hood, leggings and robe. Higher
|
||||||
bars need coal; each metal past copper needs a Smithy level (rune needs
|
bars need coal; each metal past copper needs a Smithy level (rune needs
|
||||||
level 5, so a city). Gear needs the combat level of its tier (15, 30, 45,
|
level 5, so a city). Gear needs the combat level of its tier (15, 30, 45,
|
||||||
60, 75) to wear, and the areas open at the same levels; tools need a skill
|
60, 75) to wear, and the areas open at the same levels; tools need the
|
||||||
level to use.
|
same level in their skill.
|
||||||
- **Classes are trades,** from gathering to finished goods, so each player has
|
- **Classes are trades,** from gathering to finished goods, so each player has
|
||||||
a quiet gathering side and a busier crafting side: miner (mining, smithing,
|
a quiet gathering side and a busier crafting side: miner (mining, smithing,
|
||||||
jewelcrafting),
|
jewelcrafting),
|
||||||
|
|
|
||||||
7
game.py
7
game.py
|
|
@ -80,8 +80,7 @@ ITEMS = {
|
||||||
# ladder generates its items and recipes below; the copper and iron ids
|
# ladder generates its items and recipes below; the copper and iron ids
|
||||||
# predate the ladders and are kept as they were.
|
# predate the ladders and are kept as they were.
|
||||||
|
|
||||||
TIER_LEVELS = [1, 15, 30, 45, 60, 75] # gathering / smelting level of each tier, and the combat level to wear it
|
TIER_LEVELS = [1, 15, 30, 45, 60, 75] # each tier's gathering / smelting level; also to wear and use it
|
||||||
TOOL_LEVELS = [1, 10, 20, 30, 40, 50] # skill level to use a tool or station
|
|
||||||
|
|
||||||
# key, name, ore (item id, name, icon, value), coal per bar, bar icon, bar value, smithy level, handle wood
|
# key, name, ore (item id, name, icon, value), coal per bar, bar icon, bar value, smithy level, handle wood
|
||||||
METALS = [
|
METALS = [
|
||||||
|
|
@ -214,7 +213,7 @@ for _tier, (_key, _name, _ore, _coal, _bar_icon, _bar_value, _smithy, _wood) in
|
||||||
for _skill, (_tool, _icon) in TOOLS.items():
|
for _skill, (_tool, _icon) in TOOLS.items():
|
||||||
ITEMS[f"{_key}_{_tool.replace(' ', '_')}"] = {
|
ITEMS[f"{_key}_{_tool.replace(' ', '_')}"] = {
|
||||||
"name": f"{_name} {_tool}", "icon": _icon, "value": round(2 * _bar_value * 1.4), "tier": _tier,
|
"name": f"{_name} {_tool}", "icon": _icon, "value": round(2 * _bar_value * 1.4), "tier": _tier,
|
||||||
"slot": f"tool_{_skill}", "tool": _skill, "speed": TOOL_SPEED[_tier], "req": [_skill, TOOL_LEVELS[_tier]],
|
"slot": f"tool_{_skill}", "tool": _skill, "speed": TOOL_SPEED[_tier], "req": [_skill, TIER_LEVELS[_tier]],
|
||||||
}
|
}
|
||||||
# Jewelcrafting: a gem from each tier's rock, set in a band of copper, silver or gold.
|
# Jewelcrafting: a gem from each tier's rock, set in a band of copper, silver or gold.
|
||||||
# Silver and gold are soft metals the jeweller smelts, no smithy needed. Past the first
|
# Silver and gold are soft metals the jeweller smelts, no smithy needed. Past the first
|
||||||
|
|
@ -321,7 +320,7 @@ for _tier, _wood in enumerate(WOODS):
|
||||||
for _skill, (_suffix, _noun, _glyph, _kind) in STATIONS.items():
|
for _skill, (_suffix, _noun, _glyph, _kind) in STATIONS.items():
|
||||||
ITEMS[f"{_wood}_{_suffix}"] = {
|
ITEMS[f"{_wood}_{_suffix}"] = {
|
||||||
"name": f"{WOOD_NAMES[_tier]} {_noun}", "icon": "🪚", "tier": _tier, "slot": f"station_{_skill}", "station": _skill,
|
"name": f"{WOOD_NAMES[_tier]} {_noun}", "icon": "🪚", "tier": _tier, "slot": f"station_{_skill}", "station": _skill,
|
||||||
"speed": TOOL_SPEED[_tier], "req": [_skill, TOOL_LEVELS[_tier]], "value": 0}
|
"speed": TOOL_SPEED[_tier], "req": [_skill, TIER_LEVELS[_tier]], "value": 0}
|
||||||
ITEMS[f"{_wood}_strongbox"] = {"name": f"{WOOD_NAMES[_tier]} strongbox", "plural": f"{WOOD_NAMES[_tier]} strongboxes",
|
ITEMS[f"{_wood}_strongbox"] = {"name": f"{WOOD_NAMES[_tier]} strongbox", "plural": f"{WOOD_NAMES[_tier]} strongboxes",
|
||||||
"icon": "🧰", "tier": _tier, "slot": "storage", "slots": STRONGBOX_SLOTS[_tier], "value": 0}
|
"icon": "🧰", "tier": _tier, "slot": "storage", "slots": STRONGBOX_SLOTS[_tier], "value": 0}
|
||||||
for _tier, (_fibre, _level, _time, _xp, _cloth, _prefix, _label) in enumerate(CLOTHS):
|
for _tier, (_fibre, _level, _time, _xp, _cloth, _prefix, _label) in enumerate(CLOTHS):
|
||||||
|
|
|
||||||
|
|
@ -768,7 +768,7 @@ class TierTest(unittest.TestCase):
|
||||||
world = world_with(("wil", "commoner"))
|
world = world_with(("wil", "commoner"))
|
||||||
p = world["players"]["wil"]
|
p = world["players"]["wil"]
|
||||||
self.assertEqual(game.equip_problem(p, "rune_sword"), "Needs combat level 75")
|
self.assertEqual(game.equip_problem(p, "rune_sword"), "Needs combat level 75")
|
||||||
self.assertEqual(game.equip_problem(p, "steel_pickaxe"), "Needs mining level 20")
|
self.assertEqual(game.equip_problem(p, "steel_pickaxe"), "Needs mining level 30")
|
||||||
self.assertIsNone(game.equip_problem(p, "copper_sword"))
|
self.assertIsNone(game.equip_problem(p, "copper_sword"))
|
||||||
p["xp"]["combat"] = game.XP_TABLE[75]
|
p["xp"]["combat"] = game.XP_TABLE[75]
|
||||||
self.assertIsNone(game.equip_problem(p, "rune_sword"))
|
self.assertIsNone(game.equip_problem(p, "rune_sword"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue