This repository was archived by the owner on Apr 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathharry_potter_quidditch_world_cup_game.py
More file actions
168 lines (143 loc) · 4.78 KB
/
harry_potter_quidditch_world_cup_game.py
File metadata and controls
168 lines (143 loc) · 4.78 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
from __future__ import annotations
from typing import List
from dataclasses import dataclass
from Options import Toggle
from ..game import Game
from ..game_objective_template import GameObjectiveTemplate
from ..enums import KeymastersKeepGamePlatforms
@dataclass
class HarryPotterQuidditchWorldCupArchipelagoOptions:
harry_potter_quidditch_world_cup_bulgaria_unlocked: HarryPotterQuidditchWorldCupBulgariaUnlocked
class HarryPotterQuidditchWorldCupGame(Game):
name = "Harry Potter: Quidditch World Cup"
platform = KeymastersKeepGamePlatforms.PS2
platforms_other = [
KeymastersKeepGamePlatforms.GBA,
KeymastersKeepGamePlatforms.GC,
KeymastersKeepGamePlatforms.PC,
KeymastersKeepGamePlatforms.XBOX,
]
is_adult_only_or_unrated = False
options_cls = HarryPotterQuidditchWorldCupArchipelagoOptions
def optional_game_constraint_templates(self) -> List[GameObjectiveTemplate]:
return [
GameObjectiveTemplate(
label="Use the BROOM in World Cup Related Challenges",
data={
"BROOM": (self.brooms, 1),
},
),
]
def game_objective_templates(self) -> List[GameObjectiveTemplate]:
return [
GameObjectiveTemplate(
label="Win the Hogwarts house cup as TEAM",
data={
"TEAM": (self.teams_hogwarts, 1),
},
is_time_consuming=False,
is_difficult=False,
weight=1,
),
GameObjectiveTemplate(
label="Complete the following Challenge as TEAM: CHALLENGE",
data={
"TEAM": (self.teams_hogwarts, 1),
"CHALLENGE": (self.challenges, 1),
},
is_time_consuming=False,
is_difficult=False,
weight=2,
),
GameObjectiveTemplate(
label="Win COUNT Game(s) as TEAM",
data={
"COUNT": (self.game_count_range, 1),
"TEAM": (self.teams_hogwarts, 1),
},
is_time_consuming=False,
is_difficult=False,
weight=3,
),
GameObjectiveTemplate(
label="Win COUNT Game(s) as TEAM",
data={
"COUNT": (self.game_count_range, 1),
"TEAM": (self.teams_international, 1),
},
is_time_consuming=False,
is_difficult=False,
weight=3,
),
GameObjectiveTemplate(
label="Win The Quiditch World Cup as TEAM",
data={
"TEAM": (self.teams_international, 1),
},
is_time_consuming=False,
is_difficult=False,
weight=1,
),
GameObjectiveTemplate(
label="Win The Quiditch World Cup as TEAM with HOUSE as supporting Hogwarts house",
data={
"TEAM": (self.teams_international, 1),
"HOUSE": (self.teams_hogwarts, 1),
},
is_time_consuming=False,
is_difficult=False,
weight=1,
),
]
@property
def bulgaria_unlocked(self) -> bool:
return bool(self.archipelago_options.harry_potter_quidditch_world_cup_bulgaria_unlocked.value)
@staticmethod
def teams_hogwarts() -> List[str]:
return [
"Gryffindor",
"Hufflepuff",
"Ravenclaw",
"Slytherin",
]
def teams_international(self) -> List[str]:
teams: List[str] = [
"England",
"France",
"Germany",
"Nordic",
"USA",
"Japan",
"Australia",
"Spain",
]
if self.bulgaria_unlocked:
teams.append("Bulgaria")
return sorted(teams)
@staticmethod
def challenges() -> List[str]:
return [
"Passing",
"Tackle and Shoot",
"Seeker",
"Beaters and Bludgers",
"Special Moves",
"Combos",
]
@staticmethod
def brooms() -> List[str]:
return [
"Comet 260",
"Nimbus 2000",
"Nimbus 2001",
"Firebolt",
]
@staticmethod
def game_count_range() -> range:
return range(1, 4)
# Archipelago Options
class HarryPotterQuidditchWorldCupBulgariaUnlocked(Toggle):
"""
Indicates whether the Bulgaria team is unlocked in Harry Potter: Quidditch World Cup
"""
display_name = "Harry Potter: Quidditch World Cup Bulgaria Unlocked"