diff --git a/contrib/stats.py b/contrib/stats.py index 9a9a281..a2539f0 100644 --- a/contrib/stats.py +++ b/contrib/stats.py @@ -13,7 +13,9 @@ path = sys.argv[1] if len(sys.argv) >= 2 else "." # into one. Same applies for all stats. special_stats = { "firemindam": {"template": "dmg-fire"}, - "firemaxdam": None, + "firemaxdam": { + "template": "fire-max" + }, # Cathan's rule, no other max ele dmg source exists "lightmindam": {"template": "dmg-ltng"}, "lightmaxdam": None, "magicmindam": {"template": "dmg-mag"}, diff --git a/d2warehouse/data/stats.json b/d2warehouse/data/stats.json index 77a46d6..ef37350 100644 --- a/d2warehouse/data/stats.json +++ b/d2warehouse/data/stats.json @@ -273,6 +273,14 @@ "save_add": 0, "save_param_bits": null }, + "49": { + "text": "+# to Maximum Fire Damage", + "save_bits": [ + 9 + ], + "save_add": 0, + "save_param_bits": null + }, "50": { "text": "Adds #-# Lightning Damage", "save_bits": [ diff --git a/d2warehouse/tests/test_parse_item.py b/d2warehouse/tests/test_parse_item.py index ecb2c5b..6cebed8 100644 --- a/d2warehouse/tests/test_parse_item.py +++ b/d2warehouse/tests/test_parse_item.py @@ -239,3 +239,12 @@ class ParseItemTest(unittest.TestCase): self.assertAlmostEqual( lookup_affix(item.suffixes[2], False)["name"], "of Charged Shield" ) + + def test_cathans_rule(self): + # Cathan's Rule: Only source of fire-max stat + data = bytes.fromhex( + "10008000050054c90448ad74276f910150448c180afc24ff1348fd3f212d85b415d25a48fb0f" + ) + data, item = parse_item(data) + self.assertEqual(data, b"") + self.assertEqual(str(item.stats[0]), "+10 to Maximum Fire Damage")