Skip to content

Commit

Permalink
There is actually a difference here
Browse files Browse the repository at this point in the history
  • Loading branch information
NewSoupVi committed Nov 27, 2023
1 parent d0b3d78 commit 3705b8e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions worlds/witness/player_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,20 @@ def handle_postgame(world: "WitnessWorld"):
mnt_lasers = world.options.mountain_lasers
chal_lasers = world.options.challenge_lasers

# Goal is "short box" but short box requires more lasers than long box
# Goal is "short box" but short box requires at least as many lasers as long box
reverse_or_equal_shortbox_goal = victory == "mountain_box_short" and mnt_lasers >= chal_lasers

# Goal is "short box" but short box requires strictly more lasers than long box
reverse_shortbox_goal = victory == "mountain_box_short" and mnt_lasers > chal_lasers

# Goal is "short box", and long box requires at least as many lasers as short box (as god intended)
proper_shortbox_goal = victory == "mountain_box_short" and chal_lasers >= mnt_lasers
proper_or_equal_shortbox_goal = victory == "mountain_box_short" and chal_lasers >= mnt_lasers

# Goal is "long box", but short box requires at least as many lasers than long box.
reverse_longbox_goal = victory == "mountain_box_long" and mnt_lasers >= chal_lasers
reverse_or_equal_longbox_goal = victory == "mountain_box_long" and mnt_lasers >= chal_lasers

# If goal is shortbox or "reverse longbox", you will never enter the mountain from the top before winning.
mountain_enterable_from_top = not (victory == "mountain_box_short" or reverse_longbox_goal)
mountain_enterable_from_top = not (victory == "mountain_box_short" or reverse_or_equal_longbox_goal)

# Caves & Challenge should never have anything if doors are vanilla - definitionally "post-game"
# This is technically imprecise, but it matches player expectations better.
Expand All @@ -287,7 +290,7 @@ def handle_postgame(world: "WitnessWorld"):
# Challenge can only have something if the goal is not challenge or longbox itself.
# In case of shortbox, it'd have to be a "reverse shortbox" situation where shortbox requires *more* lasers.
# In that case, it'd also have to be a doors mode, but that's already covered by the previous block.
if not (victory == "elevator" or reverse_shortbox_goal):
if not (victory == "elevator" or reverse_or_equal_shortbox_goal):
postgame_adjustments.append(get_beyond_challenge_exclusion_list())
if not victory == "challenge":
postgame_adjustments.append(get_challenge_vault_box_exclusion_list())
Expand Down Expand Up @@ -321,7 +324,7 @@ def handle_postgame(world: "WitnessWorld"):
postgame_adjustments.append(get_bottom_floor_discard_nondoors_exclusion_list())

# If we have a proper short box goal, long box will never be activated first.
if proper_shortbox_goal:
if proper_or_equal_shortbox_goal:
postgame_adjustments.append(["Disabled Locations:", "0xFFF00 (Mountain Box Long)"])

return postgame_adjustments
Expand Down

0 comments on commit 3705b8e

Please sign in to comment.