Skip to content

Commit

Permalink
The Witness: Fix Shuffle Postgame always thinking it's Challenge Vict…
Browse files Browse the repository at this point in the history
…ory (ArchipelagoMW#3504)

* Fix postgame thinking it's the wrong panel

* Also don't have a default value for it so it doesn't happen again
  • Loading branch information
NewSoupVi authored Jun 15, 2024
1 parent 92023a2 commit 2a11d61
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions worlds/witness/player_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand Down Expand Up @@ -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)",
Expand Down

0 comments on commit 2a11d61

Please sign in to comment.