The Witness: Add "Town Desert Laser Redirect Control (Panel)" as an item (#2669)

This commit is contained in:
NewSoupVi 2024-01-16 13:13:44 +01:00 committed by GitHub
parent d390d2eff8
commit 7affb885ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 36 additions and 22 deletions

View File

@ -114,9 +114,13 @@ class ShufflePostgame(Toggle):
class VictoryCondition(Choice): class VictoryCondition(Choice):
"""Change the victory condition from the original game's ending (elevator) to beating the Challenge """Set the victory condition for this world.
or solving the mountaintop box, either using the short solution Elevator: Start the elevator at the bottom of the mountain (requires Mountain Lasers).
(7 lasers or whatever you've changed it to) or the long solution (11 lasers or whatever you've changed it to).""" Challenge: Beat the secret Challenge (requires Challenge Lasers).
Mountain Box Short: Input the short solution to the Mountaintop Box (requires Mountain Lasers).
Mountain Box Long: Input the long solution to the Mountaintop Box (requires Challenge Lasers).
It is important to note that while the Mountain Box requires Desert Laser to be redirected in Town for that laser
to count, the laser locks on the Elevator and Challenge Timer panels do not."""
display_name = "Victory Condition" display_name = "Victory Condition"
option_elevator = 0 option_elevator = 0
option_challenge = 1 option_challenge = 1

View File

@ -69,6 +69,7 @@ Doors:
1167 - Town Maze Rooftop Bridge (Panel) - 0x2896A 1167 - Town Maze Rooftop Bridge (Panel) - 0x2896A
1169 - Town Windmill Entry (Panel) - 0x17F5F 1169 - Town Windmill Entry (Panel) - 0x17F5F
1172 - Town Cargo Box Entry (Panel) - 0x0A0C8 1172 - Town Cargo Box Entry (Panel) - 0x0A0C8
1173 - Town Desert Laser Redirect Control (Panel) - 0x09F98
1182 - Windmill Turn Control (Panel) - 0x17D02 1182 - Windmill Turn Control (Panel) - 0x17D02
1184 - Theater Entry (Panel) - 0x17F89 1184 - Theater Entry (Panel) - 0x17F89
1185 - Theater Video Input (Panel) - 0x00815 1185 - Theater Video Input (Panel) - 0x00815
@ -234,7 +235,7 @@ Doors:
2000 - Desert Control Panels - 0x09FAA,0x1C2DF,0x1831E,0x1C260,0x1831C,0x1C2F3,0x1831D,0x1C2B1,0x1831B 2000 - Desert Control Panels - 0x09FAA,0x1C2DF,0x1831E,0x1C260,0x1831C,0x1C2F3,0x1831D,0x1C2B1,0x1831B
2005 - Quarry Stoneworks Control Panels - 0x03678,0x03676,0x03679,0x03675 2005 - Quarry Stoneworks Control Panels - 0x03678,0x03676,0x03679,0x03675
2010 - Quarry Boathouse Control Panels - 0x03852,0x03858,0x275FA 2010 - Quarry Boathouse Control Panels - 0x03852,0x03858,0x275FA
2015 - Town Control Panels - 0x2896A,0x334D8 2015 - Town Control Panels - 0x2896A,0x334D8,0x09F98
2020 - Windmill & Theater Control Panels - 0x17D02,0x00815 2020 - Windmill & Theater Control Panels - 0x17D02,0x00815
2025 - Bunker Control Panels - 0x34BC5,0x34BC6,0x0A079 2025 - Bunker Control Panels - 0x34BC5,0x34BC6,0x0A079
2030 - Swamp Control Panels - 0x00609,0x18488,0x181F5,0x17E2B,0x17C0A,0x17E07 2030 - Swamp Control Panels - 0x00609,0x18488,0x181F5,0x17E2B,0x17C0A,0x17E07
@ -250,6 +251,7 @@ Doors:
2125 - Monastery Panels - 0x09D9B,0x00C92,0x00B10 2125 - Monastery Panels - 0x09D9B,0x00C92,0x00B10
2130 - Town Church & RGB House Panels - 0x28998,0x28A0D,0x334D8 2130 - Town Church & RGB House Panels - 0x28998,0x28A0D,0x334D8
2135 - Town Maze Panels - 0x2896A,0x28A79 2135 - Town Maze Panels - 0x2896A,0x28A79
2137 - Town Dockside House Panels - 0x0A0C8,0x09F98
2140 - Windmill & Theater Panels - 0x17D02,0x00815,0x17F5F,0x17F89,0x0A168,0x33AB2 2140 - Windmill & Theater Panels - 0x17D02,0x00815,0x17F5F,0x17F89,0x0A168,0x33AB2
2145 - Treehouse Panels - 0x0A182,0x0288C,0x02886,0x2700B,0x17CBC,0x037FF 2145 - Treehouse Panels - 0x0A182,0x0288C,0x02886,0x2700B,0x17CBC,0x037FF
2150 - Bunker Panels - 0x34BC5,0x34BC6,0x0A079,0x0A099,0x17C2E 2150 - Bunker Panels - 0x34BC5,0x34BC6,0x0A079,0x0A099,0x17C2E

View File

@ -474,7 +474,7 @@ Town (Town) - Main Island - True - The Ocean - 0x0A054 - Town Maze Rooftop - 0x2
158218 - 0x0A054 (Boat Spawn) - 0x17CA6 | 0x17CDF | 0x09DB8 | 0x17C95 - Boat 158218 - 0x0A054 (Boat Spawn) - 0x17CA6 | 0x17CDF | 0x09DB8 | 0x17C95 - Boat
158219 - 0x0A0C8 (Cargo Box Entry Panel) - True - Black/White Squares & Shapers 158219 - 0x0A0C8 (Cargo Box Entry Panel) - True - Black/White Squares & Shapers
Door - 0x0A0C9 (Cargo Box Entry) - 0x0A0C8 Door - 0x0A0C9 (Cargo Box Entry) - 0x0A0C8
158707 - 0x09F98 (Desert Laser Redirect) - True - True 158707 - 0x09F98 (Desert Laser Redirect Control) - True - True
158220 - 0x18590 (Transparent) - True - Symmetry 158220 - 0x18590 (Transparent) - True - Symmetry
158221 - 0x28AE3 (Vines) - 0x18590 - True 158221 - 0x28AE3 (Vines) - 0x18590 - True
158222 - 0x28938 (Apple Tree) - 0x28AE3 - True 158222 - 0x28938 (Apple Tree) - 0x28AE3 - True
@ -895,9 +895,9 @@ Mountainside Vault (Mountainside):
Mountaintop (Mountaintop) - Mountain Top Layer - 0x17C34: Mountaintop (Mountaintop) - Mountain Top Layer - 0x17C34:
158405 - 0x0042D (River Shape) - True - True 158405 - 0x0042D (River Shape) - True - True
158406 - 0x09F7F (Box Short) - 7 Lasers - True 158406 - 0x09F7F (Box Short) - 7 Lasers + Redirect - True
158407 - 0x17C34 (Mountain Entry Panel) - 0x09F7F - Stars & Black/White Squares & Stars + Same Colored Symbol 158407 - 0x17C34 (Mountain Entry Panel) - 0x09F7F - Stars & Black/White Squares & Stars + Same Colored Symbol
158800 - 0xFFF00 (Box Long) - 11 Lasers & 0x17C34 - True 158800 - 0xFFF00 (Box Long) - 11 Lasers + Redirect & 0x17C34 - True
159300 - 0x001A3 (River Shape EP) - True - True 159300 - 0x001A3 (River Shape EP) - True - True
159320 - 0x3370E (Arch Black EP) - True - True 159320 - 0x3370E (Arch Black EP) - True - True
159324 - 0x336C8 (Arch White Right EP) - True - True 159324 - 0x336C8 (Arch White Right EP) - True - True

View File

@ -474,7 +474,7 @@ Town (Town) - Main Island - True - The Ocean - 0x0A054 - Town Maze Rooftop - 0x2
158218 - 0x0A054 (Boat Spawn) - 0x17CA6 | 0x17CDF | 0x09DB8 | 0x17C95 - Boat 158218 - 0x0A054 (Boat Spawn) - 0x17CA6 | 0x17CDF | 0x09DB8 | 0x17C95 - Boat
158219 - 0x0A0C8 (Cargo Box Entry Panel) - True - Squares & Black/White Squares & Shapers & Triangles 158219 - 0x0A0C8 (Cargo Box Entry Panel) - True - Squares & Black/White Squares & Shapers & Triangles
Door - 0x0A0C9 (Cargo Box Entry) - 0x0A0C8 Door - 0x0A0C9 (Cargo Box Entry) - 0x0A0C8
158707 - 0x09F98 (Desert Laser Redirect) - True - True 158707 - 0x09F98 (Desert Laser Redirect Control) - True - True
158220 - 0x18590 (Transparent) - True - Symmetry 158220 - 0x18590 (Transparent) - True - Symmetry
158221 - 0x28AE3 (Vines) - 0x18590 - True 158221 - 0x28AE3 (Vines) - 0x18590 - True
158222 - 0x28938 (Apple Tree) - 0x28AE3 - True 158222 - 0x28938 (Apple Tree) - 0x28AE3 - True
@ -895,9 +895,9 @@ Mountainside Vault (Mountainside):
Mountaintop (Mountaintop) - Mountain Top Layer - 0x17C34: Mountaintop (Mountaintop) - Mountain Top Layer - 0x17C34:
158405 - 0x0042D (River Shape) - True - True 158405 - 0x0042D (River Shape) - True - True
158406 - 0x09F7F (Box Short) - 7 Lasers - True 158406 - 0x09F7F (Box Short) - 7 Lasers + Redirect - True
158407 - 0x17C34 (Mountain Entry Panel) - 0x09F7F - Stars & Black/White Squares & Stars + Same Colored Symbol & Triangles 158407 - 0x17C34 (Mountain Entry Panel) - 0x09F7F - Stars & Black/White Squares & Stars + Same Colored Symbol & Triangles
158800 - 0xFFF00 (Box Long) - 11 Lasers & 0x17C34 - True 158800 - 0xFFF00 (Box Long) - 11 Lasers + Redirect & 0x17C34 - True
159300 - 0x001A3 (River Shape EP) - True - True 159300 - 0x001A3 (River Shape EP) - True - True
159320 - 0x3370E (Arch Black EP) - True - True 159320 - 0x3370E (Arch Black EP) - True - True
159324 - 0x336C8 (Arch White Right EP) - True - True 159324 - 0x336C8 (Arch White Right EP) - True - True

View File

@ -474,7 +474,7 @@ Town (Town) - Main Island - True - The Ocean - 0x0A054 - Town Maze Rooftop - 0x2
158218 - 0x0A054 (Boat Spawn) - 0x17CA6 | 0x17CDF | 0x09DB8 | 0x17C95 - Boat 158218 - 0x0A054 (Boat Spawn) - 0x17CA6 | 0x17CDF | 0x09DB8 | 0x17C95 - Boat
158219 - 0x0A0C8 (Cargo Box Entry Panel) - True - Black/White Squares & Shapers 158219 - 0x0A0C8 (Cargo Box Entry Panel) - True - Black/White Squares & Shapers
Door - 0x0A0C9 (Cargo Box Entry) - 0x0A0C8 Door - 0x0A0C9 (Cargo Box Entry) - 0x0A0C8
158707 - 0x09F98 (Desert Laser Redirect) - True - True 158707 - 0x09F98 (Desert Laser Redirect Control) - True - True
158220 - 0x18590 (Transparent) - True - Symmetry 158220 - 0x18590 (Transparent) - True - Symmetry
158221 - 0x28AE3 (Vines) - 0x18590 - True 158221 - 0x28AE3 (Vines) - 0x18590 - True
158222 - 0x28938 (Apple Tree) - 0x28AE3 - True 158222 - 0x28938 (Apple Tree) - 0x28AE3 - True
@ -895,9 +895,9 @@ Mountainside Vault (Mountainside):
Mountaintop (Mountaintop) - Mountain Top Layer - 0x17C34: Mountaintop (Mountaintop) - Mountain Top Layer - 0x17C34:
158405 - 0x0042D (River Shape) - True - True 158405 - 0x0042D (River Shape) - True - True
158406 - 0x09F7F (Box Short) - 7 Lasers - True 158406 - 0x09F7F (Box Short) - 7 Lasers + Redirect - True
158407 - 0x17C34 (Mountain Entry Panel) - 0x09F7F - Black/White Squares 158407 - 0x17C34 (Mountain Entry Panel) - 0x09F7F - Black/White Squares
158800 - 0xFFF00 (Box Long) - 11 Lasers & 0x17C34 - True 158800 - 0xFFF00 (Box Long) - 11 Lasers + Redirect & 0x17C34 - True
159300 - 0x001A3 (River Shape EP) - True - True 159300 - 0x001A3 (River Shape EP) - True - True
159320 - 0x3370E (Arch Black EP) - True - True 159320 - 0x3370E (Arch Black EP) - True - True
159324 - 0x336C8 (Arch White Right EP) - True - True 159324 - 0x336C8 (Arch White Right EP) - True - True

View File

@ -103,7 +103,8 @@ class WitnessPlayerLogic:
if option_entity in self.EVENT_NAMES_BY_HEX: if option_entity in self.EVENT_NAMES_BY_HEX:
new_items = frozenset({frozenset([option_entity])}) new_items = frozenset({frozenset([option_entity])})
elif option_entity in {"7 Lasers", "11 Lasers", "PP2 Weirdness", "Theater to Tunnels"}: elif option_entity in {"7 Lasers", "11 Lasers", "7 Lasers + Redirect", "11 Lasers + Redirect",
"PP2 Weirdness", "Theater to Tunnels"}:
new_items = frozenset({frozenset([option_entity])}) new_items = frozenset({frozenset([option_entity])})
else: else:
new_items = self.reduce_req_within_region(option_entity) new_items = self.reduce_req_within_region(option_entity)

View File

@ -29,8 +29,9 @@ laser_hexes = [
] ]
def _has_laser(laser_hex: str, world: "WitnessWorld", player: int) -> Callable[[CollectionState], bool]: def _has_laser(laser_hex: str, world: "WitnessWorld", player: int,
if laser_hex == "0x012FB": redirect_required: bool) -> Callable[[CollectionState], bool]:
if laser_hex == "0x012FB" and redirect_required:
return lambda state: ( return lambda state: (
_can_solve_panel(laser_hex, world, world.player, world.player_logic, world.locat)(state) _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.locat)(state)
and state.has("Desert Laser Redirection", player) and state.has("Desert Laser Redirection", player)
@ -39,11 +40,11 @@ def _has_laser(laser_hex: str, world: "WitnessWorld", player: int) -> Callable[[
return _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.locat) return _can_solve_panel(laser_hex, world, world.player, world.player_logic, world.locat)
def _has_lasers(amount: int, world: "WitnessWorld") -> Callable[[CollectionState], bool]: def _has_lasers(amount: int, world: "WitnessWorld", redirect_required: bool) -> Callable[[CollectionState], bool]:
laser_lambdas = [] laser_lambdas = []
for laser_hex in laser_hexes: for laser_hex in laser_hexes:
has_laser_lambda = _has_laser(laser_hex, world, world.player) has_laser_lambda = _has_laser(laser_hex, world, world.player, redirect_required)
laser_lambdas.append(has_laser_lambda) laser_lambdas.append(has_laser_lambda)
@ -155,10 +156,16 @@ def _has_item(item: str, world: "WitnessWorld", player: int,
return lambda state: state.can_reach(item, "Region", player) return lambda state: state.can_reach(item, "Region", player)
if item == "7 Lasers": if item == "7 Lasers":
laser_req = world.options.mountain_lasers.value laser_req = world.options.mountain_lasers.value
return _has_lasers(laser_req, world) return _has_lasers(laser_req, world, False)
if item == "7 Lasers + Redirect":
laser_req = world.options.mountain_lasers.value
return _has_lasers(laser_req, world, True)
if item == "11 Lasers": if item == "11 Lasers":
laser_req = world.options.challenge_lasers.value laser_req = world.options.challenge_lasers.value
return _has_lasers(laser_req, world) return _has_lasers(laser_req, world, False)
if item == "11 Lasers + Redirect":
laser_req = world.options.challenge_lasers.value
return _has_lasers(laser_req, world, True)
elif item == "PP2 Weirdness": elif item == "PP2 Weirdness":
return lambda state: _can_do_expert_pp2(state, world) return lambda state: _can_do_expert_pp2(state, world)
elif item == "Theater to Tunnels": elif item == "Theater to Tunnels":

View File

@ -10,6 +10,7 @@ Quarry Boathouse Hook Control (Panel)
Monastery Shutters Control (Panel) Monastery Shutters Control (Panel)
Town Maze Rooftop Bridge (Panel) Town Maze Rooftop Bridge (Panel)
Town RGB Control (Panel) Town RGB Control (Panel)
Town Desert Laser Redirect Control (Panel)
Windmill Turn Control (Panel) Windmill Turn Control (Panel)
Theater Video Input (Panel) Theater Video Input (Panel)
Bunker Drop-Down Door Controls (Panel) Bunker Drop-Down Door Controls (Panel)

View File

@ -10,7 +10,7 @@ Monastery Panels
Town Church & RGB House Panels Town Church & RGB House Panels
Town Maze Panels Town Maze Panels
Windmill & Theater Panels Windmill & Theater Panels
Town Cargo Box Entry (Panel) Town Dockside House Panels
Treehouse Panels Treehouse Panels
Bunker Panels Bunker Panels
Swamp Panels Swamp Panels

View File

@ -109,7 +109,6 @@ class StaticWitnessLogicObj:
"Laser", "Laser",
"Laser Hedges", "Laser Hedges",
"Laser Pressure Plates", "Laser Pressure Plates",
"Desert Laser Redirect"
} }
is_vault_or_video = "Vault" in entity_name or "Video" in entity_name is_vault_or_video = "Vault" in entity_name or "Video" in entity_name