-
Notifications
You must be signed in to change notification settings - Fork 6
/
trinket_export.py
60 lines (45 loc) · 1.68 KB
/
trinket_export.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""Exports trinkets from simc_support to three copy= .simc files for SimulationCraft testing purpose.
"""
import typing
from simc_support.game_data.Season import Season
from simc_support.game_data.WowSpec import get_wow_spec
from simc_support.game_data.Trinket import get_trinkets_for_spec, Trinket
EXPANSION = "dragonflight"
def print_simc_file(trinket_list: typing.Iterable[Trinket], name: str):
with open(f"trinkets_{EXPANSION}_" + name + ".simc", "w") as f:
f.write("# PROFILE FOR TESTING ONLY!\n")
f.write(
"# This file provides all available trinkets for {} and neutral ones.\n".format(
name.upper()
)
)
f.write(
"# Use this file to verify whether all trinkets are functioning as expected after changes.\n"
)
f.write("# No appropriate drop itemlevel required.\n\n\n")
for trinket in trinket_list:
f.write('copy="{}"\n'.format(trinket.name))
f.write(
f"trinket1=,id={trinket.item_id},ilevel={trinket.min_itemlevel}\n\n"
)
def main():
trinkets = [
t
for t in get_trinkets_for_spec(get_wow_spec("warrior", "arms"))
if Season.DF_SEASON_1 in t.seasons
]
print_simc_file(trinkets, "str")
trinkets = [
t
for t in get_trinkets_for_spec(get_wow_spec("hunter", "marksmanship"))
if Season.DF_SEASON_1 in t.seasons
]
print_simc_file(trinkets, "agi")
trinkets = [
t
for t in get_trinkets_for_spec(get_wow_spec("shaman", "elemental"))
if Season.DF_SEASON_1 in t.seasons
]
print_simc_file(trinkets, "int")
if __name__ == "__main__":
main()