-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathretro_achievements_game.py
More file actions
83 lines (63 loc) · 2.21 KB
/
retro_achievements_game.py
File metadata and controls
83 lines (63 loc) · 2.21 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
from __future__ import annotations
from typing import List
from dataclasses import dataclass
from Options import OptionSet
from ..game import Game
from ..game_objective_template import GameObjectiveTemplate
from ..enums import KeymastersKeepGamePlatforms
@dataclass
class RetroAchievementsArchipelagoOptions:
retroachievements_games: RetroAchievementsGames
class RetroAchievementsGame(Game):
name = "RetroAchievements"
platform = KeymastersKeepGamePlatforms.META
platforms_other = None
is_adult_only_or_unrated = False
options_cls = RetroAchievementsArchipelagoOptions
def optional_game_constraint_templates(self) -> List[GameObjectiveTemplate]:
return [
GameObjectiveTemplate(
label="Use Hardcore Mode",
data=dict(),
),
]
def game_objective_templates(self) -> List[GameObjectiveTemplate]:
return [
GameObjectiveTemplate(
label="Beat GAME",
data={"GAME": (self.games, 1)},
is_time_consuming=True,
is_difficult=False,
weight=6,
),
GameObjectiveTemplate(
label="Unlock at least X% of the achievements in GAME",
data={"GAME": (self.games, 1), "X": (self.percentages, 1)},
is_time_consuming=True,
is_difficult=False,
weight=9,
),
GameObjectiveTemplate(
label="Unlock all the achievements in GAME",
data={"GAME": (self.games, 1)},
is_time_consuming=True,
is_difficult=True,
weight=1,
),
]
def games(self) -> List[str]:
return sorted(self.archipelago_options.retroachievements_games.value)
@staticmethod
def percentages() -> range:
return range(10, 76)
# Archipelago Options
class RetroAchievementsGames(OptionSet):
"""
Indicates which games the players owns and wants to hunt achievements for on RetroAchievements.
"""
display_name = "RetroAchievements Games"
default = [
"[PLATFORM] Game 1",
"[PLATFORM] Game 2",
"[PLATFORM] Game 3",
]