Skip to content

Commit

Permalink
update season 4 data
Browse files Browse the repository at this point in the history
  • Loading branch information
Bloodmallet committed Apr 21, 2024
1 parent 2f80d55 commit 5b59490
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 4 deletions.
1 change: 1 addition & 0 deletions simc_support/game_data/Expansion.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ class Expansion(int, enum.Enum):
BATTLE_FOR_AZEROTH = 7
SHADOWLANDS = 8
DRAGONFLIGHT = 9
UNKNOWN_MINUS_3 = -3
58 changes: 57 additions & 1 deletion simc_support/game_data/ItemLevel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ def _prof_range(start: int) -> typing.List[int]:
_s2_mythic = [441, 444, 447, 450]

_s3_explorer: typing.List[int] = []
_s3_adventurer: typing.List[int] = [428, 431, 434, 437, 441, 444, 447, 450]
_s3_adventurer = [428, 431, 434, 437, 441, 444, 447, 450]
_s3_veteran = [441, 444, 447, 450, 454, 457, 460, 463]
_s3_champion = [454, 457, 460, 463, 467, 470, 473, 476]
_s3_hero = [467, 470, 473, 476, 480, 483]
_s3_mythic = [480, 483, 486, 489]

_s4_explorer = [454, 457, 460, 463, 467, 470, 473, 476]
_s4_adventurer = [467, 470, 473, 476, 480, 483, 486, 489]
_s4_veteran = [480, 483, 486, 489, 493, 496, 499, 502]
_s4_champion = [493, 496, 499, 502, 506, 509, 512, 515]
_s4_hero = [506, 509, 512, 515, 519, 522]
_s4_mythic = [519, 522, 525, 528] # guessed 525 and 528


def _season_2_upgrade_range(upgrade_level: int) -> typing.List[int]:
if upgrade_level < 1:
Expand Down Expand Up @@ -65,6 +72,27 @@ def _season_3_upgrade_range(upgrade_level: int) -> typing.List[int]:
return ilevels


def _season_4_upgrade_range(upgrade_level: int) -> typing.List[int]:
if upgrade_level < 1:
raise ValueError("Upgrade level start at 1.")

options = (_s4_veteran, _s4_champion, _s4_hero, _s4_mythic)
ilevels: typing.List[int] = []
for option in options:
ilevels = ilevels + option[upgrade_level - 1 :]

# if upgrade_level == len(_s3_mythic):
# ilevels.append(_s3_mythic[-1])

# make ilevels unique
ilevels = list(set(ilevels))

# ensure ilevels are ordered
ilevels = sorted(ilevels)

return ilevels


ITEM_LEVELS = {
Source.CALLING: {
Season.SEASON_1: [],
Expand Down Expand Up @@ -96,6 +124,12 @@ def _season_3_upgrade_range(upgrade_level: int) -> typing.List[int]:
for ilevel in _s3_veteran + _s3_champion + _s3_hero + _s3_mythic[:-1]
}
),
Season.SEASON_4: list(
{
ilevel
for ilevel in _s4_veteran + _s4_champion + _s4_hero + _s4_mythic[:-2]
}
),
},
Source.PVP: {
Season.SEASON_1: [408, 424],
Expand Down Expand Up @@ -127,6 +161,7 @@ def _season_3_upgrade_range(upgrade_level: int) -> typing.List[int]:
Season.SEASON_1: [372, 376, 379, 382, 385, 389],
Season.SEASON_2: _s2_adventurer,
Season.SEASON_3: [-1],
Season.SEASON_4: [-1],
},
Source.DUNGEON: {
Season.SEASON_1: [
Expand Down Expand Up @@ -155,6 +190,9 @@ def _season_3_upgrade_range(upgrade_level: int) -> typing.List[int]:
Season.SEASON_3: list(
{ilevel for ilevel in _s3_veteran + _s3_champion + _s3_hero + _s3_mythic}
),
Season.SEASON_4: list(
{ilevel for ilevel in _s4_veteran + _s4_champion + _s4_hero + _s4_mythic}
),
},
Source.MEGA_DUNGEON: {
Season.SEASON_1: [],
Expand Down Expand Up @@ -194,6 +232,24 @@ def _season_3_upgrade_range(upgrade_level: int) -> typing.List[int]:
)
),
},
Season.SEASON_4: {
RaidTier.LOW: _season_4_upgrade_range(1),
RaidTier.MID: _season_4_upgrade_range(2),
RaidTier.HIGH: _season_4_upgrade_range(3),
RaidTier.HIGHER: _season_4_upgrade_range(4),
RaidTier.VERY_RARE: sorted(
list(
set(
[
*_s4_champion[2 - 1 :],
*_s4_hero[2 - 1 :],
*_s4_mythic[2 - 1 :],
535,
]
)
)
),
},
},
Source.TIMEWALKING: {
Season.SEASON_1: {
Expand Down
18 changes: 18 additions & 0 deletions simc_support/game_data/Season.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Season(enum.Enum):
SEASON_1 = 1
SEASON_2 = 2
SEASON_3 = 3
SEASON_4 = 4

@staticmethod
def get_seasons_from_instance(
Expand Down Expand Up @@ -65,4 +66,21 @@ def get_seasons_from_instance(
if instance in s3_instances:
seasons.append(Season.SEASON_3)

s4_instances = (
Instance.ALGETHAR_ACADEMY,
Instance.COURT_OF_STARS,
Instance.HALLS_OF_VALOR,
Instance.RUBY_LIFE_POOLS,
Instance.HALLS_OF_INFUSION,
Instance.BRACKENHIDE_HOLLOW,
Instance.ULDAMAN_LEGACY_OF_TYR,
Instance.NELTHARUS,
Instance.VAULT_OF_THE_INCARNATES,
Instance.ABERUS_THE_SHADOWED_CRUCIBLE,
Instance.AMIRDRASSIL_THE_DREAMS_HOPE,
)

if instance in s4_instances:
seasons.append(Season.SEASON_4)

return seasons
6 changes: 3 additions & 3 deletions simc_support/game_data/Talent.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ def get_unpacked_paths(
for n in self.tree.tree_nodes
if self.get_rank(n) > 0 and n.tree_node_type == TreeNodeType.CHOICE
]
unpacked_path_parts: itertools.product[
typing.Tuple[Talent, ...]
] = itertools.product(*unpackable_nodes)
unpacked_path_parts: itertools.product[typing.Tuple[Talent, ...]] = (
itertools.product(*unpackable_nodes)
)
rank_and_parts = [
tuple(zip(unpackable_ranks, part)) for part in unpacked_path_parts
]
Expand Down

0 comments on commit 5b59490

Please sign in to comment.