From e2109dba507d97d45fe4d23e3416b894a709ea16 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 10 Dec 2023 20:35:46 +0100 Subject: [PATCH] The Witness: Fix Logic Error for Keep Pressure Plates 2 EP in puzzle_randomization: none (#2515) --- worlds/witness/WitnessLogicVanilla.txt | 2 +- worlds/witness/items.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/worlds/witness/WitnessLogicVanilla.txt b/worlds/witness/WitnessLogicVanilla.txt index 8591a30d1fbb..779ead6bde4b 100644 --- a/worlds/witness/WitnessLogicVanilla.txt +++ b/worlds/witness/WitnessLogicVanilla.txt @@ -430,7 +430,7 @@ Door - 0x04F8F (Tower Shortcut) - 0x0361B 158705 - 0x03317 (Laser Panel Pressure Plates) - 0x033EA & 0x01BE9 & 0x01CD3 & 0x01D3F - Dots & Shapers & Black/White Squares & Rotated Shapers Laser - 0x014BB (Laser) - 0x0360E | 0x03317 159240 - 0x033BE (Pressure Plates 1 EP) - 0x033EA - True -159241 - 0x033BF (Pressure Plates 2 EP) - 0x01BE9 - True +159241 - 0x033BF (Pressure Plates 2 EP) - 0x01BE9 & 0x01BEA - True 159242 - 0x033DD (Pressure Plates 3 EP) - 0x01CD3 & 0x01CD5 - True 159243 - 0x033E5 (Pressure Plates 4 Left Exit EP) - 0x01D3F - True 159244 - 0x018B6 (Pressure Plates 4 Right Exit EP) - 0x01D3F - True diff --git a/worlds/witness/items.py b/worlds/witness/items.py index 15c693b25dd4..a8c889de937a 100644 --- a/worlds/witness/items.py +++ b/worlds/witness/items.py @@ -115,6 +115,7 @@ def __init__(self, world: "WitnessWorld", logic: WitnessPlayerLogic, locat: Witn # Adjust item classifications based on game settings. eps_shuffled = self._world.options.shuffle_EPs come_to_you = self._world.options.elevators_come_to_you + difficulty = self._world.options.puzzle_randomization for item_name, item_data in self.item_data.items(): if not eps_shuffled and item_name in {"Monastery Garden Entry (Door)", "Monastery Shortcuts", @@ -130,10 +131,12 @@ def __init__(self, world: "WitnessWorld", logic: WitnessPlayerLogic, locat: Witn "Monastery Laser Shortcut (Door)", "Orchard Second Gate (Door)", "Jungle Bamboo Laser Shortcut (Door)", - "Keep Pressure Plates 2 Exit (Door)", "Caves Elevator Controls (Panel)"}: # Downgrade doors that don't gate progress. item_data.classification = ItemClassification.useful + elif item_name == "Keep Pressure Plates 2 Exit (Door)" and not (difficulty == "none" and eps_shuffled): + # PP2EP requires the door in vanilla puzzles, otherwise it's unnecessary + item_data.classification = ItemClassification.useful # Build the mandatory item list. self._mandatory_items: Dict[str, int] = {}