diff options
-rw-r--r-- | apworld/__init__.py | 2 | ||||
-rw-r--r-- | apworld/options.py | 18 | ||||
-rw-r--r-- | apworld/regions.py | 6 | ||||
-rw-r--r-- | data/maps/the_parthenon/connections.txtpb | 1 | ||||
-rw-r--r-- | data/maps/the_sun_temple/connections.txtpb | 1 | ||||
-rw-r--r-- | proto/data.proto | 2 | ||||
-rw-r--r-- | proto/human.proto | 8 | ||||
-rw-r--r-- | tools/datapacker/main.cpp | 10 |
8 files changed, 48 insertions, 0 deletions
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): | |||
100 | "shuffle_gallery_paintings", | 100 | "shuffle_gallery_paintings", |
101 | "shuffle_letters", | 101 | "shuffle_letters", |
102 | "shuffle_symbols", | 102 | "shuffle_symbols", |
103 | "strict_cyan_ending", | ||
104 | "strict_purple_ending", | ||
103 | "victory_condition", | 105 | "victory_condition", |
104 | ] | 106 | ] |
105 | 107 | ||
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): | |||
92 | display_name = "Allow Daedalus Roof Access" | 92 | display_name = "Allow Daedalus Roof Access" |
93 | 93 | ||
94 | 94 | ||
95 | class 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 | |||
103 | class 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 | |||
95 | class VictoryCondition(Choice): | 111 | class VictoryCondition(Choice): |
96 | """ | 112 | """ |
97 | This option determines what your goal is. | 113 | This option determines what your goal is. |
@@ -144,5 +160,7 @@ class Lingo2Options(PerGameCommonOptions): | |||
144 | keyholder_sanity: KeyholderSanity | 160 | keyholder_sanity: KeyholderSanity |
145 | cyan_door_behavior: CyanDoorBehavior | 161 | cyan_door_behavior: CyanDoorBehavior |
146 | daedalus_roof_access: DaedalusRoofAccess | 162 | daedalus_roof_access: DaedalusRoofAccess |
163 | strict_purple_ending: StrictPurpleEnding | ||
164 | strict_cyan_ending: StrictCyanEnding | ||
147 | victory_condition: VictoryCondition | 165 | victory_condition: VictoryCondition |
148 | trap_percentage: TrapPercentage | 166 | 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"): | |||
97 | else: | 97 | else: |
98 | connection_name = f"{connection_name} (via panel {panel.name})" | 98 | connection_name = f"{connection_name} (via panel {panel.name})" |
99 | 99 | ||
100 | if connection.HasField("purple_ending") and connection.purple_ending and world.options.strict_purple_ending: | ||
101 | world.player_logic.add_solution_reqs(reqs, "abcdefghijklmnopqrstuvwxyz") | ||
102 | |||
103 | if connection.HasField("cyan_ending") and connection.cyan_ending and world.options.strict_cyan_ending: | ||
104 | world.player_logic.add_solution_reqs(reqs, "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz") | ||
105 | |||
100 | reqs.simplify() | 106 | reqs.simplify() |
101 | reqs.remove_room(from_region) | 107 | reqs.remove_room(from_region) |
102 | 108 | ||
diff --git a/data/maps/the_parthenon/connections.txtpb b/data/maps/the_parthenon/connections.txtpb index a07d858..331ac66 100644 --- a/data/maps/the_parthenon/connections.txtpb +++ b/data/maps/the_parthenon/connections.txtpb | |||
@@ -7,6 +7,7 @@ connections { | |||
7 | from_room: "Main Area" | 7 | from_room: "Main Area" |
8 | to_room: "Ending" | 8 | to_room: "Ending" |
9 | door { name: "Ending Door" } | 9 | door { name: "Ending Door" } |
10 | cyan_ending: true | ||
10 | } | 11 | } |
11 | connections { | 12 | connections { |
12 | from_room: "Main Area" | 13 | from_room: "Main Area" |
diff --git a/data/maps/the_sun_temple/connections.txtpb b/data/maps/the_sun_temple/connections.txtpb index b0b3a0a..ffe4d5d 100644 --- a/data/maps/the_sun_temple/connections.txtpb +++ b/data/maps/the_sun_temple/connections.txtpb | |||
@@ -7,6 +7,7 @@ connections { | |||
7 | from_room: "Temple" | 7 | from_room: "Temple" |
8 | to_room: "Ending" | 8 | to_room: "Ending" |
9 | door { name: "Ending" } | 9 | door { name: "Ending" } |
10 | purple_ending: true | ||
10 | } | 11 | } |
11 | connections { | 12 | connections { |
12 | from_room: "Temple" | 13 | from_room: "Temple" |
diff --git a/proto/data.proto b/proto/data.proto index 7a1918a..64e3ddc 100644 --- a/proto/data.proto +++ b/proto/data.proto | |||
@@ -109,6 +109,8 @@ message Connection { | |||
109 | } | 109 | } |
110 | 110 | ||
111 | optional bool roof_access = 7; | 111 | optional bool roof_access = 7; |
112 | optional bool purple_ending = 8; | ||
113 | optional bool cyan_ending = 9; | ||
112 | } | 114 | } |
113 | 115 | ||
114 | message Door { | 116 | message Door { |
diff --git a/proto/human.proto b/proto/human.proto index f9517bd..c247edf 100644 --- a/proto/human.proto +++ b/proto/human.proto | |||
@@ -70,6 +70,14 @@ message HumanConnection { | |||
70 | // This means that the connection intentionally skips the target object's | 70 | // This means that the connection intentionally skips the target object's |
71 | // required door. | 71 | // required door. |
72 | optional bool bypass_target_door = 8; | 72 | optional bool bypass_target_door = 8; |
73 | |||
74 | // This means that the connection should additionally require all purple | ||
75 | // letters when the Strict Purple Ending option is on. | ||
76 | optional bool purple_ending = 9; | ||
77 | |||
78 | // This means that the connection should additionally require all cyan letters | ||
79 | // when the Strict Cyan Ending option is on. | ||
80 | optional bool cyan_ending = 10; | ||
73 | } | 81 | } |
74 | 82 | ||
75 | message HumanConnections { | 83 | message HumanConnections { |
diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index c13a4df..596259b 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp | |||
@@ -473,6 +473,16 @@ class DataPacker { | |||
473 | r_connection.set_roof_access(human_connection.roof_access()); | 473 | r_connection.set_roof_access(human_connection.roof_access()); |
474 | } | 474 | } |
475 | 475 | ||
476 | if (human_connection.has_purple_ending()) { | ||
477 | f_connection.set_purple_ending(human_connection.purple_ending()); | ||
478 | r_connection.set_purple_ending(human_connection.purple_ending()); | ||
479 | } | ||
480 | |||
481 | if (human_connection.has_cyan_ending()) { | ||
482 | f_connection.set_cyan_ending(human_connection.cyan_ending()); | ||
483 | r_connection.set_cyan_ending(human_connection.cyan_ending()); | ||
484 | } | ||
485 | |||
476 | container_.AddConnection(f_connection); | 486 | container_.AddConnection(f_connection); |
477 | if (!human_connection.oneway()) { | 487 | if (!human_connection.oneway()) { |
478 | container_.AddConnection(r_connection); | 488 | container_.AddConnection(r_connection); |