--- /dev/null
+#!/usr/bin/python3
+
+def generate_map_rules():
+ out = open("maps.txt", "w")
+
+ tiers = ["same_tier", "tier-1", "tier-2"]
+ rarities = ["Normal", "Magic", "Rare", "Unique"]
+
+ for i in range(len(tiers)):
+ out.write('category "map.{}"\n'.format(tiers[i]))
+ 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):
+ out.write("\t\tand\n\t\t{\n")
+ out.write("\t\t\tdrop_level {};\n".format(67+t))
+ out.write("\t\t\tmax_item_level {};\n".format(67+t+i))
+ out.write("\t\t};\n")
+ out.write("\t};\n};\n")
+
+ for t in tiers:
+ for r in rarities:
+ out.write('category "map.{}.{}"\n'.format(r.lower(), t))
+ out.write("{\n")
+ out.write('\tcategory "map.{}";\n'.format(t))
+ out.write("\trarity {};\n".format(r))
+ out.write("};\n")
+
+ for r in rarities:
+ out.write('category "map.{}.any"\n'.format(r.lower()))
+ out.write('{\n\tclass "Map";\n')
+ out.write("\trarity {};\n".format(r))
+ out.write("};\n")
+
+def main():
+ generate_map_rules()
+
+if __name__=="__main__":
+ main()