Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Witness: Fix unreachable locations on certain settings (Keep PP2 EP, Theater Flowers EP) #2499

Merged
merged 5 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions worlds/witness/player_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def make_options_adjustments(self, world: "WitnessWorld"):
if lasers:
adjustment_linesets_in_order.append(get_laser_shuffle())

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

Expand Down Expand Up @@ -485,7 +485,7 @@ def make_event_panel_lists(self):
self.EVENT_NAMES_BY_HEX[self.VICTORY_LOCATION] = "Victory"

for event_hex, event_name in self.EVENT_NAMES_BY_HEX.items():
if event_hex in self.COMPLETELY_DISABLED_ENTITIES:
if event_hex in self.COMPLETELY_DISABLED_ENTITIES or event_hex in self.IRRELEVANT_BUT_NOT_DISABLED_ENTITIES:
continue
self.EVENT_PANELS.add(event_hex)

Expand Down
2 changes: 1 addition & 1 deletion worlds/witness/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def connect_if_possible(self, world: "WitnessWorld", source: str, target: str, r
source_region.exits.append(connection)
connection.connect(target_region)

self.created_entrances[(source, target)].append(connection)
self.created_entrances[source, target].append(connection)

# Register any necessary indirect connections
mentioned_regions = {
Expand Down
4 changes: 2 additions & 2 deletions worlds/witness/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def _can_solve_panel(panel: str, world: "WitnessWorld", player: int, player_logi


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

return (
any(entrance.can_reach(state) for entrance in entrance_forward)
Expand Down
Loading