about summary refs log tree commit diff stats
path: root/apworld
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2026-02-04 14:06:54 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2026-02-04 14:06:54 -0500
commit4f075a4962ce0efda71a3a1947c27f8a5c5a037d (patch)
tree1c3dc74fa9bdf2c9e0b28db8469b835574c61aa5 /apworld
parent92892af0dfefadd00f7681811fd20aaefed1e59f (diff)
downloadlingo2-archipelago-4f075a4962ce0efda71a3a1947c27f8a5c5a037d.tar.gz
lingo2-archipelago-4f075a4962ce0efda71a3a1947c27f8a5c5a037d.tar.bz2
lingo2-archipelago-4f075a4962ce0efda71a3a1947c27f8a5c5a037d.zip
Validate restricted options when doing daed only mode daed-only
Diffstat (limited to 'apworld')
-rw-r--r--apworld/options.py11
-rw-r--r--apworld/player_logic.py24
2 files changed, 31 insertions, 4 deletions
diff --git a/apworld/options.py b/apworld/options.py index 1323635..5661351 100644 --- a/apworld/options.py +++ b/apworld/options.py
@@ -124,9 +124,14 @@ class EnableGiftMaps(OptionSet):
124class DaedalusOnly(Toggle): 124class DaedalusOnly(Toggle):
125 """ 125 """
126 If enabled, all maps besides Daedalus, The Gold, and The Tenacious will be disabled. This overrides any other 126 If enabled, all maps besides Daedalus, The Gold, and The Tenacious will be disabled. This overrides any other
127 map-based option, such as Enable Icarus. The player will start in Daedalus. The ending must be set to Orange or 127 map-based option, such as Enable Icarus. The player will start in Daedalus. The following options are restricted
128 Gold. Worldport shuffle must be enabled. Letter shuffle cannot be set to a vanilla value. Cyan Door Behavior cannot 128 with this setting:
129 be set to Collect H2. 129
130 - The ending must be set to Orange or Gold.
131 - Worldport shuffle must be enabled.
132 - Letter shuffle must Unlocked.
133 - Cyan Door Behavior cannot be set to Collect H2.
134 - Control Center Color shuffle must be enabled.
130 """ 135 """
131 display_name = "Daedalus Only" 136 display_name = "Daedalus Only"
132 137
diff --git a/apworld/player_logic.py b/apworld/player_logic.py index d498f0f..a8385ff 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py
@@ -1,10 +1,11 @@
1from enum import IntEnum, auto 1from enum import IntEnum, auto
2 2
3from Options import OptionError
3from .generated import data_pb2 as data_pb2 4from .generated import data_pb2 as data_pb2
4from .items import SYMBOL_ITEMS 5from .items import SYMBOL_ITEMS
5from typing import TYPE_CHECKING, NamedTuple 6from typing import TYPE_CHECKING, NamedTuple
6 7
7from .options import ShuffleLetters, CyanDoorBehavior 8from .options import ShuffleLetters, CyanDoorBehavior, VictoryCondition
8 9
9if TYPE_CHECKING: 10if TYPE_CHECKING:
10 from . import Lingo2World 11 from . import Lingo2World
@@ -261,6 +262,27 @@ class Lingo2PlayerLogic:
261 if should_shuffle_map(game_map)) 262 if should_shuffle_map(game_map))
262 263
263 if world.options.daedalus_only: 264 if world.options.daedalus_only:
265 if world.options.victory_condition not in [VictoryCondition.option_orange_ending,
266 VictoryCondition.option_gold_ending]:
267 raise OptionError(f"When Daedalus Only mode is enabled, the victory condition must be Orange Ending or "
268 f"Gold Ending (Player {world.player}).")
269
270 if not world.options.shuffle_worldports:
271 raise OptionError(f"When Daedalus Only mode is enabled, worldport shuffle must also be enabled (Player "
272 f"{world.player}).")
273
274 if world.options.shuffle_letters != ShuffleLetters.option_unlocked:
275 raise OptionError(f"When Daedalus Only mode is enabled, letter shuffle must be set to Unlocked (Player "
276 f"{world.player}).")
277
278 if world.options.cyan_door_behavior == CyanDoorBehavior.option_collect_h2:
279 raise OptionError(f"When Daedalus Only mode is enabled, Cyan Door Behavior cannot be set to Collect H2 "
280 f"(Player {world.player}).")
281
282 if not world.options.shuffle_control_center_colors:
283 raise OptionError(f"When Daedalus Only mode is enabled, control center color shuffle must be enabled "
284 f"(Player {world.player}).")
285
264 for game_map in world.static_logic.objects.maps: 286 for game_map in world.static_logic.objects.maps:
265 if game_map.daedalus_only_mode == data_pb2.DaedalusOnlyMode.DAED_ONLY_PARTIAL: 287 if game_map.daedalus_only_mode == data_pb2.DaedalusOnlyMode.DAED_ONLY_PARTIAL:
266 self.shuffled_rooms.update(set(room.id for room in world.static_logic.objects.rooms 288 self.shuffled_rooms.update(set(room.id for room in world.static_logic.objects.rooms