Skip to content

The Witness: Fix logic error with Symmetry Island Upper in doors: panels (broken seed reported) #2565

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

Merged
merged 2 commits into from
Dec 6, 2023
Merged
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
18 changes: 11 additions & 7 deletions worlds/witness/player_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,19 @@ def reduce_req_within_region(self, panel_hex: str) -> FrozenSet[FrozenSet[str]]:
for items_option in these_items:
all_options.add(items_option.union(dependentItem))

# 0x28A0D depends on another entity for *non-power* reasons -> This dependency needs to be preserved...
if panel_hex != "0x28A0D":
return frozenset(all_options)
# ...except in Expert, where that dependency doesn't exist, but now there *is* a power dependency.
# 0x28A0D depends on another entity for *non-power* reasons -> This dependency needs to be preserved,
# except in Expert, where that dependency doesn't exist, but now there *is* a power dependency.
# In the future, it would be wise to make a distinction between "power dependencies" and other dependencies.
if any("0x28998" in option for option in these_panels):
return frozenset(all_options)
if panel_hex == "0x28A0D" and not any("0x28998" in option for option in these_panels):
these_items = all_options

# Another dependency that is not power-based: The Symmetry Island Upper Panel latches
elif panel_hex == 0x18269:
these_items = all_options

these_items = all_options
# For any other door entity, we just return a set with the item that opens it & disregard power dependencies
else:
return frozenset(all_options)

disabled_eps = {eHex for eHex in self.COMPLETELY_DISABLED_ENTITIES
if self.REFERENCE_LOGIC.ENTITIES_BY_HEX[eHex]["entityType"] == "EP"}
Expand Down