From: Mikko Rasa Date: Sun, 19 Aug 2018 19:26:12 +0000 (+0300) Subject: Add more map tier rules X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e1d95ecdf6c4b1a29d5ef32d493f1266be57d642;p=poefilter.git Add more map tier rules Stopping at -2 isn't really enough since a -2 map from a rare is actually the same tier as the containing map. --- diff --git a/generate-rules.py b/generate-rules.py index b830a06..2d7f96e 100755 --- a/generate-rules.py +++ b/generate-rules.py @@ -3,11 +3,13 @@ def generate_map_rules(): out = open("maps.txt", "w") - tiers = ["same_tier", "tier-1", "tier-2"] + n_tiers = 6 + tier_names = ["same_tier"] + ["tier-{}".format(i) for i in range(1, n_tiers)] + tiers = [("same_tier", 0), ("tier-2", 2), ("tier-4", 4)] rarities = ["Normal", "Magic", "Rare", "Unique"] - for i in range(len(tiers)): - out.write('category "map.{}"\n'.format(tiers[i])) + for i, n in enumerate(tier_names): + out.write('category "map.{}"\n'.format(n)) out.write('{\n\tclass "Map";\n\tor\n\t{\n') out.write("\t\tmax_item_level {};\n".format(68+i)) for t in range(2, 17): @@ -17,11 +19,11 @@ def generate_map_rules(): out.write("\t\t};\n") out.write("\t};\n};\n") - for t in tiers: + for n in tier_names: for r in rarities: - out.write('category "map.{}.{}"\n'.format(r.lower(), t)) + out.write('category "map.{}.{}"\n'.format(r.lower(), n)) out.write("{\n") - out.write('\tcategory "map.{}";\n'.format(t)) + out.write('\tcategory "map.{}";\n'.format(n)) out.write("\trarity {};\n".format(r)) out.write("};\n")