2022-04-28 22:42:11 +00:00
|
|
|
"""
|
|
|
|
Defines constants for different types of locations in the game
|
|
|
|
"""
|
|
|
|
|
2022-07-17 10:56:22 +00:00
|
|
|
from .Options import is_option_enabled, get_option_value
|
2022-10-09 02:13:52 +00:00
|
|
|
from .player_logic import WitnessPlayerLogic
|
|
|
|
from .static_logic import StaticWitnessLogic
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
|
2023-07-19 03:02:57 +00:00
|
|
|
ID_START = 158000
|
|
|
|
|
|
|
|
|
2022-04-28 22:42:11 +00:00
|
|
|
class StaticWitnessLocations:
|
|
|
|
"""
|
|
|
|
Witness Location Constants that stay consistent across worlds
|
|
|
|
"""
|
|
|
|
|
2023-03-02 23:08:24 +00:00
|
|
|
GENERAL_LOCATIONS = {
|
2022-06-16 01:04:45 +00:00
|
|
|
"Tutorial Front Left",
|
|
|
|
"Tutorial Back Left",
|
|
|
|
"Tutorial Back Right",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Tutorial Gate Open",
|
|
|
|
|
|
|
|
"Outside Tutorial Vault Box",
|
|
|
|
"Outside Tutorial Discard",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Outside Tutorial Shed Row 5",
|
|
|
|
"Outside Tutorial Tree Row 9",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
"Glass Factory Discard",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Glass Factory Back Wall 5",
|
|
|
|
"Glass Factory Front 3",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Glass Factory Melting 3",
|
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
"Symmetry Island Right 5",
|
|
|
|
"Symmetry Island Back 6",
|
|
|
|
"Symmetry Island Left 7",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Symmetry Island Scenery Outlines 5",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Symmetry Island Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
"Orchard Apple Tree 5",
|
|
|
|
|
|
|
|
"Desert Vault Box",
|
|
|
|
"Desert Discard",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Desert Surface 8",
|
|
|
|
"Desert Light Room 3",
|
|
|
|
"Desert Pond Room 5",
|
|
|
|
"Desert Flood Room 6",
|
2023-06-20 22:45:26 +00:00
|
|
|
"Desert Final Hexagonal",
|
|
|
|
"Desert Final Bent 3",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Desert Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
2023-02-07 02:12:47 +00:00
|
|
|
"Quarry Stoneworks Lower Row 6",
|
|
|
|
"Quarry Stoneworks Upper Row 8",
|
|
|
|
"Quarry Stoneworks Control Room Right",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Quarry Boathouse Intro Right",
|
|
|
|
"Quarry Boathouse Intro Left",
|
|
|
|
"Quarry Boathouse Front Row 5",
|
|
|
|
"Quarry Boathouse Back First Row 9",
|
|
|
|
"Quarry Boathouse Back Second Row 3",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Quarry Discard",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Quarry Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
"Shadows Intro 8",
|
|
|
|
"Shadows Far 8",
|
|
|
|
"Shadows Near 5",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Shadows Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
2023-06-20 22:45:26 +00:00
|
|
|
"Keep Hedge Maze 1",
|
|
|
|
"Keep Hedge Maze 2",
|
|
|
|
"Keep Hedge Maze 3",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Keep Hedge Maze 4",
|
2023-06-20 22:45:26 +00:00
|
|
|
"Keep Pressure Plates 1",
|
|
|
|
"Keep Pressure Plates 2",
|
|
|
|
"Keep Pressure Plates 3",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Keep Pressure Plates 4",
|
|
|
|
"Keep Discard",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Keep Laser Panel Hedges",
|
|
|
|
"Keep Laser Panel Pressure Plates",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
"Shipwreck Vault Box",
|
|
|
|
"Shipwreck Discard",
|
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
"Monastery Outside 3",
|
|
|
|
"Monastery Inside 4",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Monastery Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
"Town Cargo Box Discard",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Town Tall Hexagonal",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Town Church Lattice",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Town Rooftop Discard",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Town Red Rooftop 5",
|
|
|
|
"Town Wooden Roof Lower Row 5",
|
|
|
|
"Town Wooden Rooftop",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Town Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
"Theater Discard",
|
|
|
|
|
|
|
|
"Jungle Discard",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Jungle First Row 3",
|
|
|
|
"Jungle Second Row 4",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Jungle Popup Wall 6",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Jungle Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
"River Vault Box",
|
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
"Bunker Intro Left 5",
|
|
|
|
"Bunker Intro Back 4",
|
|
|
|
"Bunker Glass Room 3",
|
|
|
|
"Bunker UV Room 2",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Bunker Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
"Swamp Intro Front 6",
|
|
|
|
"Swamp Intro Back 8",
|
|
|
|
"Swamp Between Bridges Near Row 4",
|
|
|
|
"Swamp Cyan Underwater 5",
|
|
|
|
"Swamp Platform Row 4",
|
|
|
|
"Swamp Between Bridges Far Row 4",
|
|
|
|
"Swamp Red Underwater 4",
|
|
|
|
"Swamp Beyond Rotating Bridge 4",
|
|
|
|
"Swamp Blue Underwater 5",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Swamp Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
"Treehouse Yellow Bridge 9",
|
|
|
|
"Treehouse First Purple Bridge 5",
|
|
|
|
"Treehouse Second Purple Bridge 7",
|
|
|
|
"Treehouse Green Bridge 7",
|
|
|
|
"Treehouse Green Bridge Discard",
|
|
|
|
"Treehouse Left Orange Bridge 15",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Treehouse Laser Discard",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Treehouse Right Orange Bridge 12",
|
2022-07-17 10:56:22 +00:00
|
|
|
"Treehouse Laser Panel",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
"Mountainside Discard",
|
|
|
|
"Mountainside Vault Box",
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
"Mountaintop River Shape",
|
|
|
|
"Tutorial Patio Floor",
|
2023-02-07 02:12:47 +00:00
|
|
|
"Quarry Stoneworks Control Room Left",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Theater Tutorial Video",
|
|
|
|
"Theater Desert Video",
|
|
|
|
"Theater Jungle Video",
|
|
|
|
"Theater Shipwreck Video",
|
|
|
|
"Theater Mountain Video",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Town RGB Room Left",
|
|
|
|
"Town RGB Room Right",
|
2023-02-01 20:18:07 +00:00
|
|
|
"Town Sound Room Right",
|
2022-09-18 02:20:59 +00:00
|
|
|
"Swamp Purple Underwater",
|
2023-02-01 20:18:07 +00:00
|
|
|
|
|
|
|
"First Hallway EP",
|
|
|
|
"Tutorial Cloud EP",
|
|
|
|
"Tutorial Patio Flowers EP",
|
|
|
|
"Tutorial Gate EP",
|
|
|
|
"Outside Tutorial Garden EP",
|
|
|
|
"Outside Tutorial Town Sewer EP",
|
|
|
|
"Outside Tutorial Path EP",
|
|
|
|
"Outside Tutorial Tractor EP",
|
|
|
|
"Main Island Thundercloud EP",
|
|
|
|
"Glass Factory Vase EP",
|
|
|
|
"Symmetry Island Glass Factory Black Line Reflection EP",
|
|
|
|
"Symmetry Island Glass Factory Black Line EP",
|
|
|
|
"Desert Sand Snake EP",
|
|
|
|
"Desert Facade Right EP",
|
|
|
|
"Desert Facade Left EP",
|
|
|
|
"Desert Stairs Left EP",
|
|
|
|
"Desert Stairs Right EP",
|
|
|
|
"Desert Broken Wall Straight EP",
|
|
|
|
"Desert Broken Wall Bend EP",
|
|
|
|
"Desert Shore EP",
|
|
|
|
"Desert Island EP",
|
|
|
|
"Desert Pond Room Near Reflection EP",
|
|
|
|
"Desert Pond Room Far Reflection EP",
|
|
|
|
"Desert Flood Room EP",
|
|
|
|
"Desert Elevator EP",
|
|
|
|
"Quarry Shore EP",
|
|
|
|
"Quarry Entrance Pipe EP",
|
|
|
|
"Quarry Sand Pile EP",
|
|
|
|
"Quarry Rock Line EP",
|
|
|
|
"Quarry Rock Line Reflection EP",
|
|
|
|
"Quarry Railroad EP",
|
2023-02-07 02:12:47 +00:00
|
|
|
"Quarry Stoneworks Ramp EP",
|
|
|
|
"Quarry Stoneworks Lift EP",
|
2023-02-01 20:18:07 +00:00
|
|
|
"Quarry Boathouse Moving Ramp EP",
|
|
|
|
"Quarry Boathouse Hook EP",
|
2023-02-07 02:12:47 +00:00
|
|
|
"Shadows Quarry Stoneworks Rooftop Vent EP",
|
2023-02-01 20:18:07 +00:00
|
|
|
"Treehouse Beach Rock Shadow EP",
|
|
|
|
"Treehouse Beach Sand Shadow EP",
|
|
|
|
"Treehouse Beach Both Orange Bridges EP",
|
|
|
|
"Keep Red Flowers EP",
|
|
|
|
"Keep Purple Flowers EP",
|
|
|
|
"Shipwreck Circle Near EP",
|
|
|
|
"Shipwreck Circle Left EP",
|
|
|
|
"Shipwreck Circle Far EP",
|
|
|
|
"Shipwreck Stern EP",
|
|
|
|
"Shipwreck Rope Inner EP",
|
|
|
|
"Shipwreck Rope Outer EP",
|
|
|
|
"Shipwreck Couch EP",
|
|
|
|
"Keep Pressure Plates 1 EP",
|
|
|
|
"Keep Pressure Plates 2 EP",
|
|
|
|
"Keep Pressure Plates 3 EP",
|
|
|
|
"Keep Pressure Plates 4 Left Exit EP",
|
|
|
|
"Keep Pressure Plates 4 Right Exit EP",
|
|
|
|
"Keep Path EP",
|
|
|
|
"Keep Hedges EP",
|
|
|
|
"Monastery Facade Left Near EP",
|
|
|
|
"Monastery Facade Left Far Short EP",
|
|
|
|
"Monastery Facade Left Far Long EP",
|
|
|
|
"Monastery Facade Right Near EP",
|
|
|
|
"Monastery Facade Left Stairs EP",
|
|
|
|
"Monastery Facade Right Stairs EP",
|
|
|
|
"Monastery Grass Stairs EP",
|
|
|
|
"Monastery Left Shutter EP",
|
|
|
|
"Monastery Middle Shutter EP",
|
|
|
|
"Monastery Right Shutter EP",
|
|
|
|
"Town Windmill First Blade EP",
|
|
|
|
"Town Windmill Second Blade EP",
|
|
|
|
"Town Windmill Third Blade EP",
|
|
|
|
"Town Tower Underside Third EP",
|
|
|
|
"Town Tower Underside Fourth EP",
|
2023-02-07 02:12:47 +00:00
|
|
|
"Town Tower Underside First EP",
|
|
|
|
"Town Tower Underside Second EP",
|
2023-02-01 20:18:07 +00:00
|
|
|
"Town RGB House Red EP",
|
|
|
|
"Town RGB House Green EP",
|
|
|
|
"Town Maze Bridge Underside EP",
|
|
|
|
"Town Black Line Redirect EP",
|
|
|
|
"Town Black Line Church EP",
|
|
|
|
"Town Brown Bridge EP",
|
|
|
|
"Town Black Line Tower EP",
|
|
|
|
"Theater Eclipse EP",
|
|
|
|
"Theater Window EP",
|
|
|
|
"Theater Door EP",
|
|
|
|
"Theater Church EP",
|
|
|
|
"Jungle Long Arch Moss EP",
|
|
|
|
"Jungle Straight Left Moss EP",
|
|
|
|
"Jungle Pop-up Wall Moss EP",
|
|
|
|
"Jungle Short Arch Moss EP",
|
|
|
|
"Jungle Entrance EP",
|
|
|
|
"Jungle Tree Halo EP",
|
|
|
|
"Jungle Bamboo CCW EP",
|
|
|
|
"Jungle Bamboo CW EP",
|
|
|
|
"River Green Leaf Moss EP",
|
|
|
|
"River Monastery Garden Left EP",
|
|
|
|
"River Monastery Garden Right EP",
|
|
|
|
"River Monastery Wall EP",
|
|
|
|
"Bunker Tinted Door EP",
|
|
|
|
"Bunker Green Room Flowers EP",
|
|
|
|
"Swamp Purple Sand Middle EP",
|
|
|
|
"Swamp Purple Sand Top EP",
|
|
|
|
"Swamp Purple Sand Bottom EP",
|
|
|
|
"Swamp Sliding Bridge Left EP",
|
|
|
|
"Swamp Sliding Bridge Right EP",
|
|
|
|
"Swamp Cyan Underwater Sliding Bridge EP",
|
|
|
|
"Swamp Rotating Bridge CCW EP",
|
|
|
|
"Swamp Rotating Bridge CW EP",
|
|
|
|
"Swamp Boat EP",
|
|
|
|
"Swamp Long Bridge Side EP",
|
|
|
|
"Swamp Purple Underwater Right EP",
|
|
|
|
"Swamp Purple Underwater Left EP",
|
|
|
|
"Treehouse Buoy EP",
|
|
|
|
"Treehouse Right Orange Bridge EP",
|
|
|
|
"Treehouse Burned House Beach EP",
|
|
|
|
"Mountainside Cloud Cycle EP",
|
|
|
|
"Mountainside Bush EP",
|
|
|
|
"Mountainside Apparent River EP",
|
|
|
|
"Mountaintop River Shape EP",
|
|
|
|
"Mountaintop Arch Black EP",
|
|
|
|
"Mountaintop Arch White Right EP",
|
|
|
|
"Mountaintop Arch White Left EP",
|
|
|
|
"Mountain Bottom Floor Yellow Bridge EP",
|
|
|
|
"Mountain Bottom Floor Blue Bridge EP",
|
|
|
|
"Mountain Floor 2 Pink Bridge EP",
|
|
|
|
"Caves Skylight EP",
|
|
|
|
"Challenge Water EP",
|
|
|
|
"Tunnels Theater Flowers EP",
|
|
|
|
"Boat Desert EP",
|
|
|
|
"Boat Shipwreck CCW Underside EP",
|
|
|
|
"Boat Shipwreck Green EP",
|
|
|
|
"Boat Shipwreck CW Underside EP",
|
|
|
|
"Boat Bunker Yellow Line EP",
|
|
|
|
"Boat Town Long Sewer EP",
|
|
|
|
"Boat Tutorial EP",
|
|
|
|
"Boat Tutorial Reflection EP",
|
|
|
|
"Boat Tutorial Moss EP",
|
|
|
|
"Boat Cargo Box EP",
|
|
|
|
|
|
|
|
"Desert Obelisk Side 1",
|
|
|
|
"Desert Obelisk Side 2",
|
|
|
|
"Desert Obelisk Side 3",
|
|
|
|
"Desert Obelisk Side 4",
|
|
|
|
"Desert Obelisk Side 5",
|
|
|
|
"Monastery Obelisk Side 1",
|
|
|
|
"Monastery Obelisk Side 2",
|
|
|
|
"Monastery Obelisk Side 3",
|
|
|
|
"Monastery Obelisk Side 4",
|
|
|
|
"Monastery Obelisk Side 5",
|
|
|
|
"Monastery Obelisk Side 6",
|
|
|
|
"Treehouse Obelisk Side 1",
|
|
|
|
"Treehouse Obelisk Side 2",
|
|
|
|
"Treehouse Obelisk Side 3",
|
|
|
|
"Treehouse Obelisk Side 4",
|
|
|
|
"Treehouse Obelisk Side 5",
|
|
|
|
"Treehouse Obelisk Side 6",
|
|
|
|
"River Obelisk Side 1",
|
|
|
|
"River Obelisk Side 2",
|
|
|
|
"River Obelisk Side 3",
|
|
|
|
"River Obelisk Side 4",
|
|
|
|
"River Obelisk Side 5",
|
|
|
|
"River Obelisk Side 6",
|
|
|
|
"Quarry Obelisk Side 1",
|
|
|
|
"Quarry Obelisk Side 2",
|
|
|
|
"Quarry Obelisk Side 3",
|
|
|
|
"Quarry Obelisk Side 4",
|
2023-03-02 23:08:24 +00:00
|
|
|
"Quarry Obelisk Side 5",
|
2023-02-01 20:18:07 +00:00
|
|
|
"Town Obelisk Side 1",
|
|
|
|
"Town Obelisk Side 2",
|
|
|
|
"Town Obelisk Side 3",
|
|
|
|
"Town Obelisk Side 4",
|
|
|
|
"Town Obelisk Side 5",
|
|
|
|
"Town Obelisk Side 6",
|
|
|
|
}
|
|
|
|
|
|
|
|
OBELISK_SIDES = {
|
|
|
|
"Desert Obelisk Side 1",
|
|
|
|
"Desert Obelisk Side 2",
|
|
|
|
"Desert Obelisk Side 3",
|
|
|
|
"Desert Obelisk Side 4",
|
|
|
|
"Desert Obelisk Side 5",
|
|
|
|
"Monastery Obelisk Side 1",
|
|
|
|
"Monastery Obelisk Side 2",
|
|
|
|
"Monastery Obelisk Side 3",
|
|
|
|
"Monastery Obelisk Side 4",
|
|
|
|
"Monastery Obelisk Side 5",
|
|
|
|
"Monastery Obelisk Side 6",
|
|
|
|
"Treehouse Obelisk Side 1",
|
|
|
|
"Treehouse Obelisk Side 2",
|
|
|
|
"Treehouse Obelisk Side 3",
|
|
|
|
"Treehouse Obelisk Side 4",
|
|
|
|
"Treehouse Obelisk Side 5",
|
|
|
|
"Treehouse Obelisk Side 6",
|
|
|
|
"River Obelisk Side 1",
|
|
|
|
"River Obelisk Side 2",
|
|
|
|
"River Obelisk Side 3",
|
|
|
|
"River Obelisk Side 4",
|
|
|
|
"River Obelisk Side 5",
|
|
|
|
"River Obelisk Side 6",
|
|
|
|
"Quarry Obelisk Side 1",
|
|
|
|
"Quarry Obelisk Side 2",
|
|
|
|
"Quarry Obelisk Side 3",
|
|
|
|
"Quarry Obelisk Side 4",
|
2023-03-02 23:08:24 +00:00
|
|
|
"Quarry Obelisk Side 5",
|
2023-02-01 20:18:07 +00:00
|
|
|
"Town Obelisk Side 1",
|
|
|
|
"Town Obelisk Side 2",
|
|
|
|
"Town Obelisk Side 3",
|
|
|
|
"Town Obelisk Side 4",
|
|
|
|
"Town Obelisk Side 5",
|
|
|
|
"Town Obelisk Side 6",
|
2022-04-28 22:42:11 +00:00
|
|
|
}
|
|
|
|
|
2022-07-17 10:56:22 +00:00
|
|
|
CAVES_LOCATIONS = {
|
2022-09-18 02:20:59 +00:00
|
|
|
"Caves Blue Tunnel Right First 4",
|
|
|
|
"Caves Blue Tunnel Left First 1",
|
|
|
|
"Caves Blue Tunnel Left Second 5",
|
|
|
|
"Caves Blue Tunnel Right Second 5",
|
|
|
|
"Caves Blue Tunnel Right Third 1",
|
|
|
|
"Caves Blue Tunnel Left Fourth 1",
|
|
|
|
"Caves Blue Tunnel Left Third 1",
|
|
|
|
|
|
|
|
"Caves First Floor Middle",
|
|
|
|
"Caves First Floor Right",
|
|
|
|
"Caves First Floor Left",
|
|
|
|
"Caves First Floor Grounded",
|
|
|
|
"Caves Lone Pillar",
|
|
|
|
"Caves First Wooden Beam",
|
|
|
|
"Caves Second Wooden Beam",
|
|
|
|
"Caves Third Wooden Beam",
|
|
|
|
"Caves Fourth Wooden Beam",
|
|
|
|
"Caves Right Upstairs Left Row 8",
|
|
|
|
"Caves Right Upstairs Right Row 3",
|
|
|
|
"Caves Left Upstairs Single",
|
|
|
|
"Caves Left Upstairs Left Row 5",
|
|
|
|
|
|
|
|
"Tunnels Vault Box",
|
2022-04-28 22:42:11 +00:00
|
|
|
"Theater Challenge Video",
|
2023-02-01 20:18:07 +00:00
|
|
|
|
|
|
|
"Caves Skylight EP",
|
|
|
|
"Challenge Water EP",
|
|
|
|
"Tunnels Theater Flowers EP",
|
|
|
|
"Tutorial Gate EP",
|
2022-04-28 22:42:11 +00:00
|
|
|
}
|
|
|
|
|
2022-07-17 10:56:22 +00:00
|
|
|
MOUNTAIN_UNREACHABLE_FROM_BEHIND = {
|
|
|
|
"Mountaintop Trap Door Triple Exit",
|
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
"Mountain Floor 1 Right Row 5",
|
|
|
|
"Mountain Floor 1 Left Row 7",
|
|
|
|
"Mountain Floor 1 Back Row 3",
|
|
|
|
"Mountain Floor 1 Trash Pillar 2",
|
|
|
|
"Mountain Floor 2 Near Row 5",
|
|
|
|
"Mountain Floor 2 Far Row 6",
|
2023-02-01 20:18:07 +00:00
|
|
|
|
2023-03-10 06:58:00 +00:00
|
|
|
"Mountain Floor 2 Light Bridge Controller Near",
|
|
|
|
"Mountain Floor 2 Light Bridge Controller Far",
|
|
|
|
|
2023-02-01 20:18:07 +00:00
|
|
|
"Mountain Bottom Floor Yellow Bridge EP",
|
|
|
|
"Mountain Bottom Floor Blue Bridge EP",
|
|
|
|
"Mountain Floor 2 Pink Bridge EP",
|
2022-07-17 10:56:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MOUNTAIN_REACHABLE_FROM_BEHIND = {
|
2022-09-18 02:20:59 +00:00
|
|
|
"Mountain Floor 2 Elevator Discard",
|
|
|
|
"Mountain Bottom Floor Giant Puzzle",
|
|
|
|
|
|
|
|
"Mountain Final Room Left Pillar 4",
|
|
|
|
"Mountain Final Room Right Pillar 4",
|
|
|
|
}
|
2022-07-17 10:56:22 +00:00
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
MOUNTAIN_EXTRAS = {
|
|
|
|
"Challenge Vault Box",
|
|
|
|
"Theater Challenge Video",
|
|
|
|
"Mountain Bottom Floor Discard"
|
2022-07-17 10:56:22 +00:00
|
|
|
}
|
|
|
|
|
2022-04-28 22:42:11 +00:00
|
|
|
ALL_LOCATIONS_TO_ID = dict()
|
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def get_id(chex):
|
|
|
|
"""
|
|
|
|
Calculates the location ID for any given location
|
|
|
|
"""
|
|
|
|
|
2022-07-17 10:56:22 +00:00
|
|
|
return StaticWitnessLogic.CHECKS_BY_HEX[chex]["id"]
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
@staticmethod
|
|
|
|
def get_event_name(panel_hex):
|
|
|
|
"""
|
|
|
|
Returns the event name of any given panel.
|
|
|
|
"""
|
|
|
|
|
2023-02-01 20:18:07 +00:00
|
|
|
action = " Opened" if StaticWitnessLogic.CHECKS_BY_HEX[panel_hex]["panelType"] == "Door" else " Solved"
|
|
|
|
|
|
|
|
return StaticWitnessLogic.CHECKS_BY_HEX[panel_hex]["checkName"] + action
|
2022-04-28 22:42:11 +00:00
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
all_loc_to_id = {
|
|
|
|
panel_obj["checkName"]: self.get_id(chex)
|
|
|
|
for chex, panel_obj in StaticWitnessLogic.CHECKS_BY_HEX.items()
|
2022-07-17 10:56:22 +00:00
|
|
|
if panel_obj["id"]
|
2022-04-28 22:42:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
all_loc_to_id = dict(
|
|
|
|
sorted(all_loc_to_id.items(), key=lambda loc: loc[1])
|
|
|
|
)
|
|
|
|
|
|
|
|
for key, item in all_loc_to_id.items():
|
|
|
|
self.ALL_LOCATIONS_TO_ID[key] = item
|
|
|
|
|
|
|
|
|
|
|
|
class WitnessPlayerLocations:
|
|
|
|
"""
|
|
|
|
Class that defines locations for a single player
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, world, player, player_logic: WitnessPlayerLogic):
|
2022-07-17 10:56:22 +00:00
|
|
|
"""Defines locations AFTER logic changes due to options"""
|
|
|
|
|
2022-04-28 22:42:11 +00:00
|
|
|
self.PANEL_TYPES_TO_SHUFFLE = {"General", "Laser"}
|
2022-11-05 04:10:29 +00:00
|
|
|
self.CHECK_LOCATIONS = StaticWitnessLocations.GENERAL_LOCATIONS.copy()
|
2022-04-28 22:42:11 +00:00
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
doors = get_option_value(world, player, "shuffle_doors") >= 2
|
2022-07-17 10:56:22 +00:00
|
|
|
earlyutm = is_option_enabled(world, player, "early_secret_area")
|
|
|
|
victory = get_option_value(world, player, "victory_condition")
|
2022-09-18 02:20:59 +00:00
|
|
|
mount_lasers = get_option_value(world, player, "mountain_lasers")
|
|
|
|
chal_lasers = get_option_value(world, player, "challenge_lasers")
|
2023-07-19 03:02:57 +00:00
|
|
|
# laser_shuffle = get_option_value(world, player, "shuffle_lasers")
|
2022-07-17 10:56:22 +00:00
|
|
|
|
|
|
|
postgame = set()
|
|
|
|
postgame = postgame | StaticWitnessLocations.CAVES_LOCATIONS
|
|
|
|
postgame = postgame | StaticWitnessLocations.MOUNTAIN_REACHABLE_FROM_BEHIND
|
|
|
|
postgame = postgame | StaticWitnessLocations.MOUNTAIN_UNREACHABLE_FROM_BEHIND
|
2022-09-18 02:20:59 +00:00
|
|
|
postgame = postgame | StaticWitnessLocations.MOUNTAIN_EXTRAS
|
2022-07-17 10:56:22 +00:00
|
|
|
|
|
|
|
self.CHECK_LOCATIONS = self.CHECK_LOCATIONS | postgame
|
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
mountain_enterable_from_top = victory == 0 or victory == 1 or (victory == 3 and chal_lasers > mount_lasers)
|
|
|
|
|
|
|
|
if earlyutm or doors: # in non-doors, there is no way to get symbol-locked by the final pillars (currently)
|
2022-07-17 10:56:22 +00:00
|
|
|
postgame -= StaticWitnessLocations.CAVES_LOCATIONS
|
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
if (doors or earlyutm) and (victory == 0 or (victory == 2 and mount_lasers > chal_lasers)):
|
|
|
|
postgame -= {"Challenge Vault Box", "Theater Challenge Video"}
|
|
|
|
|
|
|
|
if doors or mountain_enterable_from_top:
|
2022-07-17 10:56:22 +00:00
|
|
|
postgame -= StaticWitnessLocations.MOUNTAIN_REACHABLE_FROM_BEHIND
|
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
if mountain_enterable_from_top:
|
2022-07-17 10:56:22 +00:00
|
|
|
postgame -= StaticWitnessLocations.MOUNTAIN_UNREACHABLE_FROM_BEHIND
|
2022-04-28 22:42:11 +00:00
|
|
|
|
2022-09-18 02:20:59 +00:00
|
|
|
if (victory == 0 and doors) or victory == 1 or (victory == 2 and mount_lasers > chal_lasers and doors):
|
|
|
|
postgame -= {"Mountain Bottom Floor Discard"}
|
|
|
|
|
2022-04-28 22:42:11 +00:00
|
|
|
if is_option_enabled(world, player, "shuffle_discarded_panels"):
|
|
|
|
self.PANEL_TYPES_TO_SHUFFLE.add("Discard")
|
|
|
|
|
|
|
|
if is_option_enabled(world, player, "shuffle_vault_boxes"):
|
|
|
|
self.PANEL_TYPES_TO_SHUFFLE.add("Vault")
|
|
|
|
|
2023-02-01 20:18:07 +00:00
|
|
|
if get_option_value(world, player, "shuffle_EPs") == 1:
|
|
|
|
self.PANEL_TYPES_TO_SHUFFLE.add("EP")
|
|
|
|
elif get_option_value(world, player, "shuffle_EPs") == 2:
|
|
|
|
self.PANEL_TYPES_TO_SHUFFLE.add("Obelisk Side")
|
|
|
|
|
|
|
|
for obelisk_loc in StaticWitnessLocations.OBELISK_SIDES:
|
|
|
|
obelisk_loc_hex = StaticWitnessLogic.CHECKS_BY_NAME[obelisk_loc]["checkHex"]
|
|
|
|
if player_logic.REQUIREMENTS_BY_HEX[obelisk_loc_hex] == frozenset({frozenset()}):
|
|
|
|
self.CHECK_LOCATIONS.discard(obelisk_loc)
|
|
|
|
|
2022-04-28 22:42:11 +00:00
|
|
|
self.CHECK_LOCATIONS = self.CHECK_LOCATIONS | player_logic.ADDED_CHECKS
|
|
|
|
|
2022-07-17 10:56:22 +00:00
|
|
|
if not is_option_enabled(world, player, "shuffle_postgame"):
|
|
|
|
self.CHECK_LOCATIONS -= postgame
|
|
|
|
|
2023-02-01 20:18:07 +00:00
|
|
|
self.CHECK_LOCATIONS -= {
|
|
|
|
StaticWitnessLogic.CHECKS_BY_HEX[panel]["checkName"]
|
|
|
|
for panel in player_logic.PRECOMPLETED_LOCATIONS
|
|
|
|
}
|
|
|
|
|
2022-08-22 03:50:01 +00:00
|
|
|
self.CHECK_LOCATIONS.discard(StaticWitnessLogic.CHECKS_BY_HEX[player_logic.VICTORY_LOCATION]["checkName"])
|
|
|
|
|
2022-04-28 22:42:11 +00:00
|
|
|
self.CHECK_LOCATIONS = self.CHECK_LOCATIONS - {
|
|
|
|
StaticWitnessLogic.CHECKS_BY_HEX[check_hex]["checkName"]
|
|
|
|
for check_hex in player_logic.COMPLETELY_DISABLED_CHECKS
|
|
|
|
}
|
|
|
|
|
|
|
|
self.CHECK_PANELHEX_TO_ID = {
|
|
|
|
StaticWitnessLogic.CHECKS_BY_NAME[ch]["checkHex"]: StaticWitnessLocations.ALL_LOCATIONS_TO_ID[ch]
|
|
|
|
for ch in self.CHECK_LOCATIONS
|
2023-02-01 20:18:07 +00:00
|
|
|
if StaticWitnessLogic.CHECKS_BY_NAME[ch]["panelType"] in self.PANEL_TYPES_TO_SHUFFLE
|
2022-04-28 22:42:11 +00:00
|
|
|
}
|
|
|
|
|
2023-02-01 20:18:07 +00:00
|
|
|
dog_hex = StaticWitnessLogic.CHECKS_BY_NAME["Town Pet the Dog"]["checkHex"]
|
|
|
|
dog_id = StaticWitnessLocations.ALL_LOCATIONS_TO_ID["Town Pet the Dog"]
|
|
|
|
self.CHECK_PANELHEX_TO_ID[dog_hex] = dog_id
|
|
|
|
|
2022-04-28 22:42:11 +00:00
|
|
|
self.CHECK_PANELHEX_TO_ID = dict(
|
|
|
|
sorted(self.CHECK_PANELHEX_TO_ID.items(), key=lambda item: item[1])
|
|
|
|
)
|
|
|
|
|
|
|
|
event_locations = {
|
2022-07-17 10:56:22 +00:00
|
|
|
p for p in player_logic.EVENT_PANELS
|
2022-04-28 22:42:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
self.EVENT_LOCATION_TABLE = {
|
|
|
|
StaticWitnessLocations.get_event_name(panel_hex): None
|
|
|
|
for panel_hex in event_locations
|
|
|
|
}
|
|
|
|
|
|
|
|
check_dict = {
|
2023-02-01 20:18:07 +00:00
|
|
|
StaticWitnessLogic.CHECKS_BY_HEX[location]["checkName"]:
|
|
|
|
StaticWitnessLocations.get_id(StaticWitnessLogic.CHECKS_BY_HEX[location]["checkHex"])
|
|
|
|
for location in self.CHECK_PANELHEX_TO_ID
|
2022-04-28 22:42:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
self.CHECK_LOCATION_TABLE = {**self.EVENT_LOCATION_TABLE, **check_dict}
|