From 2a11d610b6d18df9e226719e9c14ab34dddacc27 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Sun, 16 Jun 2024 01:56:20 +0200 Subject: [PATCH] The Witness: Fix Shuffle Postgame always thinking it's Challenge Victory (#3504) * Fix postgame thinking it's the wrong panel * Also don't have a default value for it so it doesn't happen again --- worlds/witness/player_logic.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/worlds/witness/player_logic.py b/worlds/witness/player_logic.py index 4335f9524f1e..05b3cf3a98e4 100644 --- a/worlds/witness/player_logic.py +++ b/worlds/witness/player_logic.py @@ -399,6 +399,16 @@ def make_options_adjustments(self, world: "WitnessWorld") -> None: mnt_lasers = world.options.mountain_lasers chal_lasers = world.options.challenge_lasers + # Victory Condition + if victory == "elevator": + self.VICTORY_LOCATION = "0x3D9A9" + elif victory == "challenge": + self.VICTORY_LOCATION = "0x0356B" + elif victory == "mountain_box_short": + self.VICTORY_LOCATION = "0x09F7F" + elif victory == "mountain_box_long": + self.VICTORY_LOCATION = "0xFFF00" + # Exclude panels from the post-game if shuffle_postgame is false. if not world.options.shuffle_postgame: adjustment_linesets_in_order += self.handle_postgame(world) @@ -418,17 +428,6 @@ def make_options_adjustments(self, world: "WitnessWorld") -> None: if not victory == "challenge": adjustment_linesets_in_order.append(["Disabled Locations:", "0x0A332"]) - # Victory Condition - - if victory == "elevator": - self.VICTORY_LOCATION = "0x3D9A9" - elif victory == "challenge": - self.VICTORY_LOCATION = "0x0356B" - elif victory == "mountain_box_short": - self.VICTORY_LOCATION = "0x09F7F" - elif victory == "mountain_box_long": - self.VICTORY_LOCATION = "0xFFF00" - # Long box can usually only be solved by opening Mountain Entry. However, if it requires 7 lasers or less # (challenge_lasers <= 7), you can now solve it without opening Mountain Entry first. # Furthermore, if the user sets mountain_lasers > 7, the box is rotated to not require Mountain Entry either. @@ -874,7 +873,7 @@ def __init__(self, world: "WitnessWorld", disabled_locations: Set[str], start_in self.PRECOMPLETED_LOCATIONS = set() self.EXCLUDED_LOCATIONS = set() self.ADDED_CHECKS = set() - self.VICTORY_LOCATION = "0x0356B" + self.VICTORY_LOCATION: str self.ALWAYS_EVENT_NAMES_BY_HEX = { "0x00509": "+1 Laser (Symmetry Laser)",