about summary refs log tree commit diff stats
path: root/apworld/options.py
diff options
context:
space:
mode:
Diffstat (limited to 'apworld/options.py')
-rw-r--r--apworld/options.py204
1 files changed, 201 insertions, 3 deletions
diff --git a/apworld/options.py b/apworld/options.py index d984beb..f687434 100644 --- a/apworld/options.py +++ b/apworld/options.py
@@ -1,15 +1,170 @@
1from dataclasses import dataclass 1from dataclasses import dataclass
2 2
3from Options import PerGameCommonOptions, Toggle, Choice 3from Options import PerGameCommonOptions, Toggle, Choice, DefaultOnToggle, Range, OptionSet
4 4
5 5
6class ShuffleDoors(Toggle): 6class ShuffleDoors(DefaultOnToggle):
7 """If enabled, most doors will open from receiving an item rather than fulfilling the in-game requirements.""" 7 """If enabled, most doors will open from receiving an item rather than fulfilling the in-game requirements."""
8 display_name = "Shuffle Doors" 8 display_name = "Shuffle Doors"
9 9
10 10
11class ShuffleControlCenterColors(Toggle):
12 """
13 Some doors open after solving the COLOR panel in the Control Center. If this option is enabled, these doors will
14 instead open upon receiving an item.
15 """
16 display_name = "Shuffle Control Center Colors"
17
18
19class ShuffleGalleryPaintings(Toggle):
20 """If enabled, gallery paintings will appear from receiving an item rather than by triggering them normally."""
21 display_name = "Shuffle Gallery Paintings"
22
23
24class ShuffleLetters(Choice):
25 """
26 Controls how letter unlocks are handled. Note that H1, I1, N1, and T1 will always be present at their vanilla
27 locations in the starting room, even if letters are shuffled remotely.
28
29 - **Vanilla**: All letters will be present at their vanilla locations.
30 - **Unlocked**: Players will start with their keyboards fully unlocked.
31 - **Progressive**: Two items will be added to the pool for every letter (one for H, I, N, and T). Receiving the
32 first item gives you the corresponding level 1 letter, and the second item gives you the corresponding level 2
33 letter.
34 - **Vanilla Cyan**: Players will start with all level 1 (purple) letters unlocked. Level 2 (cyan) letters will be
35 present at their vanilla locations.
36 - **Item Cyan**: Players will start with all level 1 (purple) letters unlocked. One item will be added to the pool
37 for every level 2 (cyan) letter.
38 """
39 display_name = "Shuffle Letters"
40 option_vanilla = 0
41 option_unlocked = 1
42 option_progressive = 2
43 option_vanilla_cyan = 3
44 option_item_cyan = 4
45
46
47class ShuffleSymbols(Toggle):
48 """
49 If enabled, 19 items will be added to the pool, representing the different symbols that can appear on a panel.
50 Players will be prevented from solving puzzles with symbols on them until all of the required symbols are unlocked.
51 """
52 display_name = "Shuffle Symbols"
53
54
55class ShuffleWorldports(Toggle):
56 """
57 Randomizes the connections between maps. This affects worldports only, which are the loading zones you walk into in
58 order to change maps. This does not affect paintings, panels that teleport you, or certain other special connections
59 like the one between The Shop and Control Center.
60 """
61 display_name = "Shuffle Worldports"
62
63
64class KeyholderSanity(Toggle):
65 """
66 If enabled, 26 locations will be created for placing each key into its respective Green Ending keyholder.
67
68 NOTE: This does not apply to the two disappearing keyholders in The Congruent, as they are not part of Green Ending.
69 """
70 display_name = "Keyholder Sanity"
71
72
73class CyanDoorBehavior(Choice):
74 """
75 Cyan-colored doors usually only open upon unlocking double letters. Some panels also only appear upon unlocking
76 double letters. This option determines how these unlocks should behave.
77
78 - **Collect H2**: In the base game, H2 is the first double letter you are intended to collect, so cyan doors only
79 open when you collect the H2 pickup in The Repetitive. Collecting the actual pickup is still required even with
80 remote letter shuffle enabled.
81 - **Any Double Letter**: Cyan doors will open when you have unlocked any cyan letter on your keyboard. In letter
82 shuffle, this means receiving a cyan letter, not picking up a cyan letter collectable.
83 - **Item**: Cyan doors will be grouped together in a single item.
84
85 Note that some cyan doors are impacted by door shuffle (e.g. the entrance to The Tower). When door shuffle is
86 enabled, these doors won't be affected by the value of this option.
87 """
88 display_name = "Cyan Door Behavior"
89 option_collect_h2 = 0
90 option_any_double_letter = 1
91 option_item = 2
92
93
94class EnableIcarus(Toggle):
95 """
96 Controls whether Icarus is randomized. If disabled, which is the default, no locations or items will be created for
97 it, and its worldport will not be shuffled when worldport shuffle is on.
98 """
99 display_name = "Enable Icarus"
100
101
102class EnableGiftMaps(OptionSet):
103 """
104 Controls whether the beta tester gift maps are randomized. By default, these are not accessible at all from within
105 the randomizer. This option allows you to enter the maps, and creates items and locations for them. If worldport
106 shuffle is on, their worldports will be included in the randomization.
107
108 The gift maps are accessed via a panel in The Entry's Starting Room, which only appears if at least one gift map is
109 enabled. It is also treated like a cyan door, and will not appear until the condition specified in the Cyan Door
110 Behavior option is satisfied. Solving this panel with the name of one of the beta testers will teleport you to their
111 corresponding gift map.
112
113 In the base game, nothing happens once you complete a gift map. Masteries have been added to the gift maps in the
114 randomizer so that the player can be rewarded for completing them.
115
116 Note that the gift maps were originally only intended to be played by specific people, and as a result may be
117 frustrating or require knowledge of inside jokes. The Crystalline is particularly difficult as it requires
118 completing a parkour course.
119 """
120 display_name = "Enable Gift Maps"
121 valid_keys = ["The Advanced", "The Charismatic", "The Crystalline", "The Fuzzy", "The Stellar"]
122
123
124class DaedalusRoofAccess(Toggle):
125 """
126 If enabled, the player will be logically expected to be able to go from the castle entrance to any part of Daedalus
127 that is open to the air. If disabled, the player will only be expected to be able to enter the castle, the moat,
128 Icarus, and the area at the bottom of the stairs. Invisible walls that become opaque as you approach them are added
129 to the level to prevent the player from accidentally breaking logic.
130 """
131 display_name = "Allow Daedalus Roof Access"
132
133
134class StrictPurpleEnding(DefaultOnToggle):
135 """
136 If enabled, the player will be required to have all purple (level 1) letters in order to get Purple Ending.
137 Otherwise, some of the letters may be skippable depending on the other options.
138 """
139 display_name = "Strict Purple Ending"
140
141
142class StrictCyanEnding(DefaultOnToggle):
143 """
144 If enabled, the player will be required to have all cyan (level 2) letters in order to get Cyan Ending. Otherwise,
145 at least J2, Q2, and V2 are skippable. Others may also be skippable depending on the options chosen.
146 """
147 display_name = "Strict Cyan Ending"
148
149
11class VictoryCondition(Choice): 150class VictoryCondition(Choice):
12 """Victory condition.""" 151 """
152 This option determines what your goal is.
153
154 - **Gray Ending** (The Colorful)
155 - **Purple Ending** (The Sun Temple). This ordinarily requires all level 1 (purple) letters.
156 - **Mint Ending** (typing EXIT into the keyholders in Control Center)
157 - **Black Ending** (The Graveyard)
158 - **Blue Ending** (The Words)
159 - **Cyan Ending** (The Parthenon). This ordinarily requires almost all level 2 (cyan) letters.
160 - **Red Ending** (The Tower)
161 - **Plum Ending** (The Wondrous / The Door)
162 - **Orange Ending** (the castle in Daedalus)
163 - **Gold Ending** (The Gold). This involves going through the color rooms in Daedalus.
164 - **Yellow Ending** (The Gallery). This requires unlocking all gallery paintings.
165 - **Green Ending** (The Ancient). This requires filling all keyholders with specific letters.
166 - **White Ending** (Control Center). This combines every other ending.
167 """
13 display_name = "Victory Condition" 168 display_name = "Victory Condition"
14 option_gray_ending = 0 169 option_gray_ending = 0
15 option_purple_ending = 1 170 option_purple_ending = 1
@@ -26,7 +181,50 @@ class VictoryCondition(Choice):
26 option_white_ending = 12 181 option_white_ending = 12
27 182
28 183
184class EndingsRequirement(Range):
185 """The number of endings required to unlock White Ending."""
186 display_name = "Endings Requirement"
187 range_start = 0
188 range_end = 12
189 default = 12
190
191
192class MasteriesRequirement(Range):
193 """The number of masteries required to unlock White Ending.
194
195 There are only 13 masteries in the base game, but some of the other slot options may add more masteries to the
196 world. If the chosen number of masteries is higher than the total in your world, it will be automatically lowered to
197 the maximum."""
198 display_name = "Masteries Requirement"
199 range_start = 0
200 range_end = 19
201 default = 0
202
203
204class TrapPercentage(Range):
205 """Replaces junk items with traps, at the specified rate."""
206 display_name = "Trap Percentage"
207 range_start = 0
208 range_end = 100
209 default = 0
210
211
29@dataclass 212@dataclass
30class Lingo2Options(PerGameCommonOptions): 213class Lingo2Options(PerGameCommonOptions):
31 shuffle_doors: ShuffleDoors 214 shuffle_doors: ShuffleDoors
215 shuffle_control_center_colors: ShuffleControlCenterColors
216 shuffle_gallery_paintings: ShuffleGalleryPaintings
217 shuffle_letters: ShuffleLetters
218 shuffle_symbols: ShuffleSymbols
219 shuffle_worldports: ShuffleWorldports
220 keyholder_sanity: KeyholderSanity
221 cyan_door_behavior: CyanDoorBehavior
222 enable_icarus: EnableIcarus
223 enable_gift_maps: EnableGiftMaps
224 daedalus_roof_access: DaedalusRoofAccess
225 strict_purple_ending: StrictPurpleEnding
226 strict_cyan_ending: StrictCyanEnding
32 victory_condition: VictoryCondition 227 victory_condition: VictoryCondition
228 endings_requirement: EndingsRequirement
229 masteries_requirement: MasteriesRequirement
230 trap_percentage: TrapPercentage