From 875115f4b3df2e539a75ff1c48fe071752f4de7d Mon Sep 17 00:00:00 2001 From: Beaker271 Date: Sat, 22 Apr 2023 09:15:59 -0700 Subject: [PATCH] Desert Laser fixes Added a script, $laser|num to check status of a laser --- locations/locations.json | 12 ++++++------ locations/logic.json | 4 ++-- scripts/archipelago.lua | 4 ++++ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/locations/locations.json b/locations/locations.json index fe7e9980..6c967184 100644 --- a/locations/locations.json +++ b/locations/locations.json @@ -898,7 +898,7 @@ { "name": "Elevator EP", "visibility_rules": ["eps"], - "access_rules": ["@Places/desertLaser", "Desert Laser"], + "access_rules": ["@Places/desertLaser, $laser|4"], "item_count": 1 } ], @@ -934,7 +934,7 @@ { "name": "Elevator EP (Desert Side 4)", "visibility_rules": ["obelisks"], - "access_rules": ["@Places/desertLaser", "Desert Laser"], + "access_rules": ["@Places/desertLaser, $laser|4"], "item_count": 1 } ], @@ -1845,7 +1845,7 @@ "access_rules": ["@Pressure Plates 4/Pressure Plates, @Places/keepTower"], "visibility_rules": ["obelisks"], "item_count": 1 - }, + } ], "map_locations": [ { @@ -2512,7 +2512,7 @@ "sections": [ { "name": "Main Island Thundercloud EP", - "access_rules": ["@Desert/Laser", "Desert Laser"], + "access_rules": ["$laser|4"], "visibility_rules": ["eps"], "item_count": 1 } @@ -2812,7 +2812,7 @@ "visibility_rules": ["obelisks, epDiffEclipse, Unrandomized"], "access_rules": ["@Theater/Challenge Video", "epDiffNormal", "epdiffTedious"], "item_count": 1 - }, + } ], "map_locations": [ @@ -4849,7 +4849,7 @@ "name": "Challenge Water EP (Town Side 4)", "visibility_rules": ["obelisks"], "item_count": 1 - }, + } ], "map_locations": [ { diff --git a/locations/logic.json b/locations/logic.json index 697fa274..93291543 100644 --- a/locations/logic.json +++ b/locations/logic.json @@ -92,7 +92,7 @@ "access_rules": [ "$isDoors|off, [$hasPanel|Desert Flood Room Flood Controls (Panel)], @Places/desertFlood", "$isDoors|on, Desert Door to Elevator Room, @Places/desertFlood", - "$isDoors|on, Desert Laser, Theater Walkway Door to Desert Elevator Room, @Places/tunnels" + "$isDoors|on, $laser|4, Theater Walkway Door to Desert Elevator Room, @Places/tunnels" ], "item_count": 1 }, @@ -603,7 +603,7 @@ "access_rules": [ "$isDoors|off, @Mountain Challenge Area/Door to Tunnels Panel, @Places/challenge", "$isDoors|on, Theater Walkway Door to Town", - "$isDoors|on, Theater Walkway Door to Desert Elevator Room, @Places/desertLaser", + "$isDoors|on, Theater Walkway Door to Desert Elevator Room, $laser|4, @Places/desertLaser", "$isDoors|on, Theater Walkway Door to Back of Theater, @Places/windmill", "$isDoors|on, Challenge Door to Theater Walkway, @Places/challenge" ], diff --git a/scripts/archipelago.lua b/scripts/archipelago.lua index bfc875a4..197af993 100644 --- a/scripts/archipelago.lua +++ b/scripts/archipelago.lua @@ -437,6 +437,10 @@ function showGoal() print(Tracker:FindObjectForCode("Goal").CurrentStage, Tracker:FindObjectForCode("hiddenGoal").CurrentStage) end +function laser(num) + return (lasers[tonumber(num)] > 0) +end + -- add AP callbacks -- un-/comment as needed