diff --git a/ootrando_overworldmap_hamsda/changelog.md b/ootrando_overworldmap_hamsda/changelog.md index 39886028..a0563287 100644 --- a/ootrando_overworldmap_hamsda/changelog.md +++ b/ootrando_overworldmap_hamsda/changelog.md @@ -3,6 +3,7 @@ ## x - fixed Spirit fire locked chests with sticks +- added blue fire logic to ER (buying not supported) ## 3.3.0.0 diff --git a/ootrando_overworldmap_hamsda/scripts/logic_entrance.lua b/ootrando_overworldmap_hamsda/scripts/logic_entrance.lua index 3f2c5f8e..70db8195 100644 --- a/ootrando_overworldmap_hamsda/scripts/logic_entrance.lua +++ b/ootrando_overworldmap_hamsda/scripts/logic_entrance.lua @@ -246,6 +246,40 @@ function has_bottle() return or_accessibility(deliver, travel) end +blue_fire_locations = { + ["either"] = { + "Ganons Castle Water Trial", + "Ganons Castle MQ Water Trial", + "Gerudo Training Grounds MQ Stalfos Room", + "Ice Cavern MQ Map Room" + }, + ["adult"] = { + "Ice Cavern" + } +} +function has_blue_fire() + local bottle = has_bottle() + + if bottle == AccessibilityLevel.None then + return AccessibilityLevel.None + end + + --TODO: shopsanity + --if has("wallet2") then + -- return bottle + --end + + for age, locations in pairs(blue_fire_locations) do + for _, location in ipairs(locations) do + if access_region(location, age) == AccessibilityLevel.Normal then + return bottle + end + end + end + + return AccessibilityLevel.SequenceBreak +end + function drain_well() if has("ocarina") and has("storm") then return access_region("Kak Windmill", "child") diff --git a/ootrando_overworldmap_hamsda/scripts/regions.lua b/ootrando_overworldmap_hamsda/scripts/regions.lua index 76614a32..453e9bfd 100644 --- a/ootrando_overworldmap_hamsda/scripts/regions.lua +++ b/ootrando_overworldmap_hamsda/scripts/regions.lua @@ -4712,8 +4712,7 @@ data_per_region = { return AccessibilityLevel.Normal end, ["adult_access"] = function() - --TODO: blue fire - return has_bottle() + return has_blue_fire() end }, ["ZD Storms Grotto"] = { @@ -10895,7 +10894,7 @@ data_per_region = { }, ["Ice Cavern Compass Chest"] = { ["child_access"] = function() - return has_bottle() --TODO: blue fire + return has_blue_fire() end, ["adult_access"] = function() return has_bottle() @@ -10904,7 +10903,7 @@ data_per_region = { ["Ice Cavern Iron Boots Chest"] = { ["child_access"] = function() if has("sling") or has("sticks") or has("sword1") or (has("dinsfire") and has("magic")) then - return has_bottle() --TODO: blue fire + return has_blue_fire() end return AccessibilityLevel.None end, @@ -10915,7 +10914,7 @@ data_per_region = { ["Sheik in Ice Cavern"] = { ["child_access"] = function() if has("sling") or has("sticks") or has("sword1") or (has("dinsfire") and has("magic")) then - return has_bottle() --TODO: blue fire + return has_blue_fire() end return AccessibilityLevel.None end, @@ -10925,7 +10924,7 @@ data_per_region = { }, ["Ice Cavern Freestanding PoH"] = { ["child_access"] = function() - return has_bottle() --TODO: blue fire + return has_blue_fire() end, ["adult_access"] = function() return has_bottle() @@ -10948,7 +10947,7 @@ data_per_region = { ["Ice Cavern GS Heart Piece Room"] = { ["child_access"] = function() if has("boomerang") then - return has_bottle() --TODO: blue fire + return has_blue_fire() end return AccessibilityLevel.None end, @@ -10962,7 +10961,7 @@ data_per_region = { ["Ice Cavern GS Push Block Room"] = { ["child_access"] = function() if has("boomerang") then - return has_bottle() --TODO: blue fire + return has_blue_fire() end return AccessibilityLevel.None end, @@ -11015,7 +11014,7 @@ data_per_region = { }, ["Ice Cavern MQ Iron Boots Region"] = { ["child_access"] = function() - return has_bottle() --TODO: blue fire + return has_blue_fire() end, ["adult_access"] = function() return has_bottle()