3 def generate_map_rules():
4 out = open("maps.txt", "w")
6 tiers = ["same_tier", "tier-1", "tier-2"]
7 rarities = ["Normal", "Magic", "Rare", "Unique"]
9 for i in range(len(tiers)):
10 out.write('category "map.{}"\n'.format(tiers[i]))
11 out.write('{\n\tclass "Map";\n\tor\n\t{\n')
12 out.write("\t\tmax_item_level {};\n".format(68+i))
13 for t in range(2, 17):
14 out.write("\t\tand\n\t\t{\n")
15 out.write("\t\t\tdrop_level {};\n".format(67+t))
16 out.write("\t\t\tmax_item_level {};\n".format(67+t+i))
18 out.write("\t};\n};\n")
22 out.write('category "map.{}.{}"\n'.format(r.lower(), t))
24 out.write('\tcategory "map.{}";\n'.format(t))
25 out.write("\trarity {};\n".format(r))
29 out.write('category "map.{}.any"\n'.format(r.lower()))
30 out.write('{\n\tclass "Map";\n')
31 out.write("\trarity {};\n".format(r))
37 if __name__=="__main__":