forked from HotPocketRemix/DarkSoulsItemRandomizer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
randomizer_options.py
115 lines (100 loc) · 3.74 KB
/
randomizer_options.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
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
class RandOptDifficulty:
EASY = 0
MEDIUM = 1
HARD = 2
@classmethod
def as_string(cls, diff):
if diff == cls.EASY:
return "Fair"
elif diff == cls.MEDIUM:
return "Unfair"
elif diff == cls.HARD:
return "Very Unfair"
else:
return ""
class RandOptKeyDifficulty:
LEAVE_ALONE = 0
RANDOMIZE = 1
RACE_MODE = 2
SPEEDRUN_MODE = 3
@classmethod
def as_string(cls, diff):
if diff == cls.LEAVE_ALONE:
return "Not Shuffled"
elif diff == cls.RANDOMIZE:
return "Shuffled"
elif diff == cls.RACE_MODE:
return "Race Mode"
elif diff == cls.SPEEDRUN_MODE:
return "Race Mode +"
else:
return ""
class RandOptStartItemsDifficulty:
SHIELD_AND_1H = 0
SHIELD_AND_2H = 1
COMBINED_POOL_AND_2H = 2
@classmethod
def as_string(cls, diff):
if diff == cls.SHIELD_AND_1H:
return "Shield & 1H Weapon"
elif diff == cls.SHIELD_AND_2H:
return "Shield & 1/2H Weapon"
elif diff == cls.COMBINED_POOL_AND_2H:
return "Shield/Weapon & Weapon"
else:
return ""
class RandOptSoulItemsDifficulty:
SHUFFLE = 0
CONSUMABLE = 1
TRANSPOSE = 2
@classmethod
def as_string(cls, diff):
if diff == cls.SHUFFLE:
return "Shuffled"
elif diff == cls.CONSUMABLE:
return "Replaced"
elif diff == cls.TRANSPOSE:
return "Transposed"
else:
return ""
class RandOptGameVersion:
PTDE = "DARK SOULS: Prepare To Die Edition"
REMASTERED = "DARK SOULS: REMASTERED"
@classmethod
def as_string(cls, version):
if version == cls.PTDE:
return cls.PTDE
elif version == cls.REMASTERED:
return cls.REMASTERED
else:
return ""
class RandomizerOptions:
def __init__(self, difficulty, fashion_souls, key_placement,
use_lordvessel, use_lord_souls, soul_items_diff, start_items_diff,
game_version, randomize_npc_armor):
self.difficulty = difficulty
self.fashion_souls = fashion_souls
self.key_placement = key_placement
self.use_lordvessel = use_lordvessel
self.use_lord_souls = use_lord_souls
self.soul_items_diff = soul_items_diff
self.start_items_diff = start_items_diff
self.game_version = game_version
self.randomize_npc_armor = randomize_npc_armor
def bool_option_to_string(self, b):
if b:
return "On"
else:
return "Off"
def as_string(self):
return_string = "Randomizer Settings:\n"
return_string += " Game Version: " + RandOptGameVersion.as_string(self.game_version) + "\n"
return_string += " Difficulty: " + RandOptDifficulty.as_string(self.difficulty) + "\n"
return_string += " Fashion Souls: " + self.bool_option_to_string(self.fashion_souls) + "\n"
return_string += " Key Difficulty: " + RandOptKeyDifficulty.as_string(self.key_placement) + "\n"
return_string += " Senile Gwynevere: " + self.bool_option_to_string(self.use_lordvessel) + "\n"
return_string += " Senile Primordial Serpents: " + self.bool_option_to_string(self.use_lord_souls) + "\n"
return_string += " Soul Items: " + RandOptSoulItemsDifficulty.as_string(self.soul_items_diff) + "\n"
return_string += " Starting Items: " + RandOptStartItemsDifficulty.as_string(self.start_items_diff) + "\n"
return_string += " Laundromat Mixup: " + self.bool_option_to_string(self.randomize_npc_armor) + "\n"
return return_string