From 229a263131370570e29f027df7e3fb5a55a0f834 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Wed, 6 Dec 2023 18:17:27 +0100 Subject: [PATCH] The Witness: Fix logic error with Symmetry Island Upper in doors: panels (broken seed reported) (#2565) Door entities think they can be solved without any other panels needing to be solved. Usually, this is true, because they no longer need to be "powered on" by a previous panel. However, there are some entities that need another entity to be powered/solved for a different reason. In this case, Symmetry Island Lower Left set opens the latches that block your ability to solve the panel. The panel itself actually starts on. Playing doors: panels does not change this, unlike usually where dependencies like this get removed by playing that mode. In the long term, I want to somehow be able to "mark" dependencies as "environmental" or "power based" so I can distinguish them properly. --- worlds/witness/player_logic.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/worlds/witness/player_logic.py b/worlds/witness/player_logic.py index cfd36c09..a4a5b04d 100644 --- a/worlds/witness/player_logic.py +++ b/worlds/witness/player_logic.py @@ -70,15 +70,19 @@ class WitnessPlayerLogic: 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 - 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 + + # 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"}