From 2115232d2fec48fceef052b476af4afb02746ad1 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 19 Sep 2025 11:04:48 -0400 Subject: Added strict purple/cyan ending options --- apworld/__init__.py | 2 ++ apworld/options.py | 18 ++++++++++++++++++ apworld/regions.py | 6 ++++++ 3 files changed, 26 insertions(+) (limited to 'apworld') diff --git a/apworld/__init__.py b/apworld/__init__.py index 8b2e42e..f1de503 100644 --- a/apworld/__init__.py +++ b/apworld/__init__.py @@ -100,6 +100,8 @@ class Lingo2World(World): "shuffle_gallery_paintings", "shuffle_letters", "shuffle_symbols", + "strict_cyan_ending", + "strict_purple_ending", "victory_condition", ] diff --git a/apworld/options.py b/apworld/options.py index 52d2034..3646eea 100644 --- a/apworld/options.py +++ b/apworld/options.py @@ -92,6 +92,22 @@ class DaedalusRoofAccess(Toggle): display_name = "Allow Daedalus Roof Access" +class StrictPurpleEnding(DefaultOnToggle): + """ + If enabled, the player will be required to have all purple (level 1) letters in order to get Purple Ending. + Otherwise, some of the letters may be skippable depending on the other options. + """ + display_name = "Strict Purple Ending" + + +class StrictCyanEnding(DefaultOnToggle): + """ + If enabled, the player will be required to have all cyan (level 2) letters in order to get Cyan Ending. Otherwise, + at least J2, Q2, and V2 are skippable. Others may also be skippable depending on the options chosen. + """ + display_name = "Strict Cyan Ending" + + class VictoryCondition(Choice): """ This option determines what your goal is. @@ -144,5 +160,7 @@ class Lingo2Options(PerGameCommonOptions): keyholder_sanity: KeyholderSanity cyan_door_behavior: CyanDoorBehavior daedalus_roof_access: DaedalusRoofAccess + strict_purple_ending: StrictPurpleEnding + strict_cyan_ending: StrictCyanEnding victory_condition: VictoryCondition trap_percentage: TrapPercentage diff --git a/apworld/regions.py b/apworld/regions.py index fad9bc7..993eec8 100644 --- a/apworld/regions.py +++ b/apworld/regions.py @@ -97,6 +97,12 @@ def create_regions(world: "Lingo2World"): else: connection_name = f"{connection_name} (via panel {panel.name})" + if connection.HasField("purple_ending") and connection.purple_ending and world.options.strict_purple_ending: + world.player_logic.add_solution_reqs(reqs, "abcdefghijklmnopqrstuvwxyz") + + if connection.HasField("cyan_ending") and connection.cyan_ending and world.options.strict_cyan_ending: + world.player_logic.add_solution_reqs(reqs, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz") + reqs.simplify() reqs.remove_room(from_region) -- cgit 1.4.1