Skip to content

Commit aee304e

Browse files
authored
Update hyrule_warriors_definitive_edition_game.py (ArchipelagoMW#27)
1 parent 01089f0 commit aee304e

File tree

1 file changed

+53
-85
lines changed

1 file changed

+53
-85
lines changed

worlds/keymasters_keep/games/hyrule_warriors_definitive_edition_game.py

+53-85
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from dataclasses import dataclass
66

7+
from Options import OptionSet
78

89
from ..game import Game
910
from ..game_objective_template import GameObjectiveTemplate
@@ -13,7 +14,7 @@
1314

1415
@dataclass
1516
class HyruleWarriorsDefinitiveEditionArchipelagoOptions:
16-
pass
17+
hyrule_warriors_definitive_edition_unlocked_characters: HyruleWarriorsDefinitiveEditionUnlockedCharacters
1718

1819

1920
class HyruleWarriorsDefinitiveEditionGame(Game):
@@ -47,17 +48,17 @@ def optional_game_constraint_templates(self) -> List[GameObjectiveTemplate]:
4748
def game_objective_templates(self) -> List[GameObjectiveTemplate]:
4849
return [
4950
GameObjectiveTemplate(
50-
label="Complete STAGE with CHARACTER",
51+
label="Complete STAGE using CHARACTER",
5152
data={
5253
"STAGE": (self.stages, 1),
5354
"CHARACTER": (self.characters, 1),
5455
},
5556
is_time_consuming=False,
5657
is_difficult=False,
57-
weight=3,
58+
weight=5,
5859
),
5960
GameObjectiveTemplate(
60-
label="Beat the Battle Challenge BATTLE CHALLENGE with CHARACTER",
61+
label="Beat the Battle Challenge BATTLE CHALLENGE using CHARACTER",
6162
data={
6263
"BATTLE CHALLENGE": (self.battle_challenges, 1),
6364
"CHARACTER": (self.characters, 1),
@@ -67,7 +68,7 @@ def game_objective_templates(self) -> List[GameObjectiveTemplate]:
6768
weight=2,
6869
),
6970
GameObjectiveTemplate(
70-
label="Beat the Boss Challenge BOSS CHALLENGE with CHARACTER",
71+
label="Beat the Boss Challenge BOSS CHALLENGE using CHARACTER",
7172
data={
7273
"BOSS CHALLENGE": (self.boss_challenges, 1),
7374
"CHARACTER": (self.characters, 1),
@@ -77,69 +78,35 @@ def game_objective_templates(self) -> List[GameObjectiveTemplate]:
7778
weight=2,
7879
),
7980
GameObjectiveTemplate(
80-
label="Beat the Ganon's Fury Mission GANON'S FURY with CHARACTER",
81+
label="Beat the Ganon's Fury Mission GANON'S FURY",
8182
data={
8283
"GANON'S FURY": (self.ganons_fury, 1),
83-
"CHARACTER": (self.characters, 1),
8484
},
8585
is_time_consuming=True,
8686
is_difficult=True,
8787
weight=1,
8888
),
8989
GameObjectiveTemplate(
90-
label="Unlock the following Character: CHARACTER",
91-
data={
92-
"CHARACTER": (self.characters_unlockable, 1),
93-
},
94-
is_time_consuming=False,
95-
is_difficult=False,
96-
weight=1,
97-
),
98-
GameObjectiveTemplate(
99-
label="Unlock the following Weapon: WEAPON",
100-
data={
101-
"WEAPON": (self.weapons_unlockable, 1),
102-
},
103-
is_time_consuming=False,
104-
is_difficult=False,
105-
weight=1,
106-
),
107-
GameObjectiveTemplate(
108-
label="Reach at least 5% Completion on ADVENTURE_MODE",
90+
label="Complete NUM stages within the MAP",
10991
data={
110-
"ADVENTURE_MODE": (self.adventure_mode_maps, 1),
92+
"NUM": (lambda: list(range(5, 31, 5)), 1),
93+
"MAP": (self.adventure_mode_maps, 1)
11194
},
112-
is_time_consuming=False,
95+
is_time_consuming=True,
11396
is_difficult=False,
114-
weight=2,
97+
weight=4
11598
),
11699
GameObjectiveTemplate(
117-
label="Reach at least 10% Completion on ADVENTURE_MODE",
100+
label="Complete NUM stages within the MAP using CHARACTER",
118101
data={
119-
"ADVENTURE_MODE": (self.adventure_mode_maps, 1),
102+
"NUM": (lambda: list(range(3, 6)), 1),
103+
"MAP": (self.adventure_mode_maps, 1),
104+
"CHARACTER": (self.characters, 1)
120105
},
121106
is_time_consuming=False,
122107
is_difficult=False,
123-
weight=2,
124-
),
125-
GameObjectiveTemplate(
126-
label="Reach at least 25% Completion on ADVENTURE_MODE",
127-
data={
128-
"ADVENTURE_MODE": (self.adventure_mode_maps, 1),
129-
},
130-
is_time_consuming=True,
131-
is_difficult=False,
132-
weight=1,
133-
),
134-
GameObjectiveTemplate(
135-
label="Reach at least 50% Completion on ADVENTURE_MODE",
136-
data={
137-
"ADVENTURE_MODE": (self.adventure_mode_maps, 1),
138-
},
139-
is_time_consuming=True,
140-
is_difficult=True,
141-
weight=1,
142-
),
108+
weight=5
109+
)
143110
]
144111

145112
@staticmethod
@@ -159,16 +126,21 @@ def ranks() -> List[str]:
159126
"C Rank",
160127
]
161128

129+
def characters(self) -> List[str]:
130+
characters = self.characters_base()
131+
characters.extend(sorted(self.archipelago_options.hyrule_warriors_definitive_edition_unlocked_characters.value))
132+
return characters
133+
162134
@staticmethod
163-
def characters() -> List[str]:
135+
def characters_base() -> List[str]:
164136
return [
165-
"Link",
166-
"Impa",
137+
"Link with the Hylian Sword",
138+
"Impa with the Giant Blade",
167139
"Sheik",
168-
"Lana",
140+
"Lana with the Book of Sorcery",
169141
"Darunia",
170-
"Zelda",
171-
"Ganondorf",
142+
"Zelda with the Rapier",
143+
"Ganondorf with the Great Swords",
172144
"Ruto",
173145
"Agitha",
174146
"Midna",
@@ -178,19 +150,7 @@ def characters() -> List[str]:
178150
"Cia",
179151
"Volga",
180152
"Wizzro",
181-
"Twili Midna",
182-
"Young Link",
183-
"Tingle",
184-
"Linkle",
185-
"Skull Kid",
186-
"Toon Link",
187-
"Tetra",
188-
"King Daphnes",
189-
"Medli",
190-
"Marin",
191-
"Toon Zelda",
192-
"Ravio",
193-
"Yuga",
153+
"Linkle with the Twin Crossbows",
194154
]
195155

196156
@staticmethod
@@ -200,7 +160,7 @@ def characters_unlockable() -> List[str]:
200160
"Young Link",
201161
"Tingle",
202162
"Skull Kid",
203-
"Toon Link",
163+
"Toon Link with the Light Sword",
204164
"Tetra",
205165
"King Daphnes",
206166
"Medli",
@@ -213,19 +173,20 @@ def characters_unlockable() -> List[str]:
213173
@staticmethod
214174
def weapons_unlockable() -> List[str]:
215175
return [
216-
"Magic Rod",
217-
"Great Fairy",
218-
"Gauntlets",
219-
"Master Sword",
220-
"Horse",
221-
"Spinner",
222-
"Niginata",
223-
"Summoning Gate",
224-
"Baton",
225-
"Dominion Rod",
226-
"Trident",
227-
"Boots",
228-
"Sand Wand",
176+
"Link with the Magic Rod",
177+
"Link & the Great Fairy",
178+
"Link with the Gauntlets",
179+
"Link with the Master Sword",
180+
"Link with the Horse",
181+
"Link with the Spinner",
182+
"Impa with the Naginata",
183+
"Lana with the Spear",
184+
"Lana with the Summoning Gate",
185+
"Zelda with the Baton",
186+
"Zelda with the Dominion Rod",
187+
"Ganondorf with the Trident",
188+
"Linkle with the Boots",
189+
"Toon Link with the Sand Wand",
229190
]
230191

231192
@staticmethod
@@ -317,5 +278,12 @@ def ganons_fury() -> List[str]:
317278
"Survival Battle LV.4",
318279
]
319280

281+
320282
# Archipelago Options
321-
# ...
283+
class HyruleWarriorsDefinitiveEditionUnlockedCharacters(OptionSet):
284+
"""What unlockable characters/weapons should be considered for objectives in Hyrule Warriors: Definitive Edition"""
285+
valid_keys = HyruleWarriorsDefinitiveEditionGame.characters_unlockable() \
286+
+ HyruleWarriorsDefinitiveEditionGame.weapons_unlockable()
287+
288+
default = valid_keys
289+

0 commit comments

Comments
 (0)