Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Witness: Fix Shuffle Postgame always thinking it's Challenge Victory #3504

Merged
merged 2 commits into from
Jun 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading