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.py157
1 files changed, 155 insertions, 2 deletions
diff --git a/apworld/options.py b/apworld/options.py index 77f0ae3..3646eea 100644 --- a/apworld/options.py +++ b/apworld/options.py
@@ -1,13 +1,166 @@
1from dataclasses import dataclass 1from dataclasses import dataclass
2 2
3from Options import PerGameCommonOptions, Toggle 3from Options import PerGameCommonOptions, Toggle, Choice, DefaultOnToggle, Range
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 KeyholderSanity(Toggle):
56 """
57 If enabled, 26 locations will be created for placing each key into its respective Green Ending keyholder.
58
59 NOTE: This does not apply to the two disappearing keyholders in The Congruent, as they are not part of Green Ending.
60 """
61 display_name = "Keyholder Sanity"
62
63
64class CyanDoorBehavior(Choice):
65 """
66 Cyan-colored doors usually only open upon unlocking double letters. Some panels also only appear upon unlocking
67 double letters. This option determines how these unlocks should behave.
68
69 - **Collect H2**: In the base game, H2 is the first double letter you are intended to collect, so cyan doors only
70 open when you collect the H2 pickup in The Repetitive. Collecting the actual pickup is still required even with
71 remote letter shuffle enabled.
72 - **Any Double Letter**: Cyan doors will open when you have unlocked any cyan letter on your keyboard. In letter
73 shuffle, this means receiving a cyan letter, not picking up a cyan letter collectable.
74 - **Item**: Cyan doors will be grouped together in a single item.
75
76 Note that some cyan doors are impacted by door shuffle (e.g. the entrance to The Tower). When door shuffle is
77 enabled, these doors won't be affected by the value of this option.
78 """
79 display_name = "Cyan Door Behavior"
80 option_collect_h2 = 0
81 option_any_double_letter = 1
82 option_item = 2
83
84
85class DaedalusRoofAccess(Toggle):
86 """
87 If enabled, the player will be logically expected to be able to go from the castle entrance to any part of Daedalus
88 that is open to the air. If disabled, the player will only be expected to be able to enter the castle, the moat,
89 Icarus, and the area at the bottom of the stairs. Invisible walls that become opaque as you approach them are added
90 to the level to prevent the player from accidentally breaking logic.
91 """
92 display_name = "Allow Daedalus Roof Access"
93
94
95class StrictPurpleEnding(DefaultOnToggle):
96 """
97 If enabled, the player will be required to have all purple (level 1) letters in order to get Purple Ending.
98 Otherwise, some of the letters may be skippable depending on the other options.
99 """
100 display_name = "Strict Purple Ending"
101
102
103class StrictCyanEnding(DefaultOnToggle):
104 """
105 If enabled, the player will be required to have all cyan (level 2) letters in order to get Cyan Ending. Otherwise,
106 at least J2, Q2, and V2 are skippable. Others may also be skippable depending on the options chosen.
107 """
108 display_name = "Strict Cyan Ending"
109
110
111class VictoryCondition(Choice):
112 """
113 This option determines what your goal is.
114
115 - **Gray Ending** (The Colorful)
116 - **Purple Ending** (The Sun Temple). This ordinarily requires all level 1 (purple) letters.
117 - **Mint Ending** (typing EXIT into the keyholders in Control Center)
118 - **Black Ending** (The Graveyard)
119 - **Blue Ending** (The Words)
120 - **Cyan Ending** (The Parthenon). This ordinarily requires almost all level 2 (cyan) letters.
121 - **Red Ending** (The Tower)
122 - **Plum Ending** (The Wondrous / The Door)
123 - **Orange Ending** (the castle in Daedalus)
124 - **Gold Ending** (The Gold). This involves going through the color rooms in Daedalus.
125 - **Yellow Ending** (The Gallery). This requires unlocking all gallery paintings.
126 - **Green Ending** (The Ancient). This requires filling all keyholders with specific letters.
127 - **White Ending** (Control Center). This combines every other ending.
128 """
129 display_name = "Victory Condition"
130 option_gray_ending = 0
131 option_purple_ending = 1
132 option_mint_ending = 2
133 option_black_ending = 3
134 option_blue_ending = 4
135 option_cyan_ending = 5
136 option_red_ending = 6
137 option_plum_ending = 7
138 option_orange_ending = 8
139 option_gold_ending = 9
140 option_yellow_ending = 10
141 option_green_ending = 11
142 option_white_ending = 12
143
144
145class TrapPercentage(Range):
146 """Replaces junk items with traps, at the specified rate."""
147 display_name = "Trap Percentage"
148 range_start = 0
149 range_end = 100
150 default = 0
151
152
11@dataclass 153@dataclass
12class Lingo2Options(PerGameCommonOptions): 154class Lingo2Options(PerGameCommonOptions):
13 shuffle_doors: ShuffleDoors 155 shuffle_doors: ShuffleDoors
156 shuffle_control_center_colors: ShuffleControlCenterColors
157 shuffle_gallery_paintings: ShuffleGalleryPaintings
158 shuffle_letters: ShuffleLetters
159 shuffle_symbols: ShuffleSymbols
160 keyholder_sanity: KeyholderSanity
161 cyan_door_behavior: CyanDoorBehavior
162 daedalus_roof_access: DaedalusRoofAccess
163 strict_purple_ending: StrictPurpleEnding
164 strict_cyan_ending: StrictCyanEnding
165 victory_condition: VictoryCondition
166 trap_percentage: TrapPercentage