From 7258a7af47cf0cdb2051892a090679f6f29c247d Mon Sep 17 00:00:00 2001 From: Dennis Date: Sat, 29 Aug 2020 00:19:39 +0200 Subject: [PATCH] fixed error in bombchu function --- ootrando_overworldmap_hamsda/changelog.md | 4 +++ .../scripts/logic.lua | 25 ++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ootrando_overworldmap_hamsda/changelog.md b/ootrando_overworldmap_hamsda/changelog.md index 30e028a7..b08a36cd 100644 --- a/ootrando_overworldmap_hamsda/changelog.md +++ b/ootrando_overworldmap_hamsda/changelog.md @@ -1,5 +1,9 @@ # Changelog +## x + +- fixed error in bombchu function + ## 2.9.5.0 - added more logic tricks diff --git a/ootrando_overworldmap_hamsda/scripts/logic.lua b/ootrando_overworldmap_hamsda/scripts/logic.lua index f0cd2eac..84c002ad 100644 --- a/ootrando_overworldmap_hamsda/scripts/logic.lua +++ b/ootrando_overworldmap_hamsda/scripts/logic.lua @@ -75,6 +75,7 @@ function has_bombchus() return chus, AccessibilityLevel.SequenceBreak end end + return 0, AccessibilityLevel.None end function has_explosives() @@ -708,14 +709,30 @@ function has_projectile(age) local bow = has("bow") local hook = has("hookshot") + local result = false + if age == "child" then - return explo or sling or rang + if explo or sling or rang then + result = true + end elseif age == "adult" then - return explo or bow or hook + if explo or bow or hook then + result = true + end elseif age == "both" then - return explo or (bow or hook) and (sling or rang) + if explo or (bow or hook) and (sling or rang) then + result = true + end else - return explo or (bow or hook) or (sling or rang) + if explo or (bow or hook) or (sling or rang) then + result = true + end + end + + if result then + return 1, AccessibilityLevel.Normal + else + return 0, AccessibilityLevel.None end end