Skip to content

Commit 0c850fc

Browse files
NewSoupViJouramie
authored andcommitted
The Witness: Fix logic error with Symmetry Island Upper in doors: panels (broken seed reported) (ArchipelagoMW#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.
1 parent f7aef3a commit 0c850fc

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

worlds/witness/player_logic.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,19 @@ def reduce_req_within_region(self, panel_hex: str) -> FrozenSet[FrozenSet[str]]:
7070
for items_option in these_items:
7171
all_options.add(items_option.union(dependentItem))
7272

73-
# 0x28A0D depends on another entity for *non-power* reasons -> This dependency needs to be preserved...
74-
if panel_hex != "0x28A0D":
75-
return frozenset(all_options)
76-
# ...except in Expert, where that dependency doesn't exist, but now there *is* a power dependency.
73+
# 0x28A0D depends on another entity for *non-power* reasons -> This dependency needs to be preserved,
74+
# except in Expert, where that dependency doesn't exist, but now there *is* a power dependency.
7775
# In the future, it would be wise to make a distinction between "power dependencies" and other dependencies.
78-
if any("0x28998" in option for option in these_panels):
79-
return frozenset(all_options)
76+
if panel_hex == "0x28A0D" and not any("0x28998" in option for option in these_panels):
77+
these_items = all_options
78+
79+
# Another dependency that is not power-based: The Symmetry Island Upper Panel latches
80+
elif panel_hex == 0x18269:
81+
these_items = all_options
8082

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

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

0 commit comments

Comments
 (0)