Jewellery tabs by slot, loupe doubles crafts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-10-20 22:15:57 +01:00
parent 8d6d23261e
commit 2816ca8606
3 changed files with 25 additions and 8 deletions

View file

@ -1723,6 +1723,20 @@ class JewelcraftingTest(unittest.TestCase):
p["equip"]["ring"] = "garnet_might"
self.assertEqual(game.combat_power(p), game.combat_power({**p, "equip": {**p["equip"], "ring": None}}) + 4)
def test_loupe_doubles_any_class_crafts(self):
self.ann["xp"]["jewelcrafting"] = game.XP_TABLE[15]
for loupe, rings in ((None, 1), ("quartz_loupe", 2)):
self.ann["equip"]["trinket"] = loupe
self.ann["bank"] = {"copper_bar": 1, "quartz": 1}
game.start_action(self.world, self.ann, "jc_quartz_haste", T0)
game.process_player(self.world, self.ann, T0 + 1000, Always())
self.assertEqual(self.ann["bank"], {"quartz_haste": rings})
def test_jewellery_tabs_by_slot(self):
self.assertEqual(game.ACTION_BY_ID["jc_garnet_haste"]["group"], "Rings")
self.assertEqual(game.ACTION_BY_ID["jc_diamond_warding"]["group"], "Amulets")
self.assertEqual(game.ACTION_BY_ID["jc_quartz_loupe"]["group"], "Trinkets")
def test_miners_cut_jewels(self):
self.assertIn("jewelcrafting", game.CLASSES["miner"]["fast"])
self.assertIn("jewelcrafting", game.CLASSES["miner"]["craft"])