Skip to content

Commit f914478

Browse files
NewSoupViqwint
authored andcommitted
The Witness: Fix Shuffle Postgame always thinking it's Challenge Victory (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
1 parent cf35b7d commit f914478

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

worlds/witness/player_logic.py

+11-12
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,16 @@ def make_options_adjustments(self, world: "WitnessWorld") -> None:
399399
mnt_lasers = world.options.mountain_lasers
400400
chal_lasers = world.options.challenge_lasers
401401

402+
# Victory Condition
403+
if victory == "elevator":
404+
self.VICTORY_LOCATION = "0x3D9A9"
405+
elif victory == "challenge":
406+
self.VICTORY_LOCATION = "0x0356B"
407+
elif victory == "mountain_box_short":
408+
self.VICTORY_LOCATION = "0x09F7F"
409+
elif victory == "mountain_box_long":
410+
self.VICTORY_LOCATION = "0xFFF00"
411+
402412
# Exclude panels from the post-game if shuffle_postgame is false.
403413
if not world.options.shuffle_postgame:
404414
adjustment_linesets_in_order += self.handle_postgame(world)
@@ -418,17 +428,6 @@ def make_options_adjustments(self, world: "WitnessWorld") -> None:
418428
if not victory == "challenge":
419429
adjustment_linesets_in_order.append(["Disabled Locations:", "0x0A332"])
420430

421-
# Victory Condition
422-
423-
if victory == "elevator":
424-
self.VICTORY_LOCATION = "0x3D9A9"
425-
elif victory == "challenge":
426-
self.VICTORY_LOCATION = "0x0356B"
427-
elif victory == "mountain_box_short":
428-
self.VICTORY_LOCATION = "0x09F7F"
429-
elif victory == "mountain_box_long":
430-
self.VICTORY_LOCATION = "0xFFF00"
431-
432431
# Long box can usually only be solved by opening Mountain Entry. However, if it requires 7 lasers or less
433432
# (challenge_lasers <= 7), you can now solve it without opening Mountain Entry first.
434433
# 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
874873
self.PRECOMPLETED_LOCATIONS = set()
875874
self.EXCLUDED_LOCATIONS = set()
876875
self.ADDED_CHECKS = set()
877-
self.VICTORY_LOCATION = "0x0356B"
876+
self.VICTORY_LOCATION: str
878877

879878
self.ALWAYS_EVENT_NAMES_BY_HEX = {
880879
"0x00509": "+1 Laser (Symmetry Laser)",

0 commit comments

Comments
 (0)