Skip to content

Commit 3fa01a4

Browse files
authored
The Witness: Fix unreachable locations on certain settings (Keep PP2 EP, Theater Flowers EP) (#2499)
Basically, the function for "checking entrances both ways" only checked one way. This resulted in unreachable locations. This affects Expert seeds with (non-remote doors and specific types of EP Shuffle), as well as seeds with non-remote doors + specific types of disabled panels + specific types of EP Shuffle. Also includes two changes that makes spoiler logs nicer (not creating unnecessary events).
1 parent 87252c1 commit 3fa01a4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

worlds/witness/player_logic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def make_options_adjustments(self, world: "WitnessWorld"):
375375
if lasers:
376376
adjustment_linesets_in_order.append(get_laser_shuffle())
377377

378-
if world.options.shuffle_EPs:
378+
if world.options.shuffle_EPs == "obelisk_sides":
379379
ep_gen = ((ep_hex, ep_obj) for (ep_hex, ep_obj) in self.REFERENCE_LOGIC.ENTITIES_BY_HEX.items()
380380
if ep_obj["entityType"] == "EP")
381381

@@ -489,7 +489,7 @@ def make_event_panel_lists(self):
489489
self.EVENT_NAMES_BY_HEX[self.VICTORY_LOCATION] = "Victory"
490490

491491
for event_hex, event_name in self.EVENT_NAMES_BY_HEX.items():
492-
if event_hex in self.COMPLETELY_DISABLED_ENTITIES:
492+
if event_hex in self.COMPLETELY_DISABLED_ENTITIES or event_hex in self.IRRELEVANT_BUT_NOT_DISABLED_ENTITIES:
493493
continue
494494
self.EVENT_PANELS.add(event_hex)
495495

worlds/witness/regions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def connect_if_possible(self, world: "WitnessWorld", source: str, target: str, r
7171
source_region.exits.append(connection)
7272
connection.connect(target_region)
7373

74-
self.created_entrances[(source, target)].append(connection)
74+
self.created_entrances[source, target].append(connection)
7575

7676
# Register any necessary indirect connections
7777
mentioned_regions = {

worlds/witness/rules.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def _can_solve_panel(panel: str, world: "WitnessWorld", player: int, player_logi
6666

6767

6868
def _can_move_either_direction(state: CollectionState, source: str, target: str, regio: WitnessRegions) -> bool:
69-
entrance_forward = regio.created_entrances[(source, target)]
70-
entrance_backward = regio.created_entrances[(source, target)]
69+
entrance_forward = regio.created_entrances[source, target]
70+
entrance_backward = regio.created_entrances[target, source]
7171

7272
return (
7373
any(entrance.can_reach(state) for entrance in entrance_forward)

0 commit comments

Comments
 (0)