From bcc3405a35167dac6b80a10991641042d65e55de Mon Sep 17 00:00:00 2001 From: dyceron Date: Tue, 9 Jul 2024 20:08:14 -0400 Subject: [PATCH] Increment Metroid count if going through A8 Backwards --- src/open_samus_returns_rando/files/levels/s100_area10.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/open_samus_returns_rando/files/levels/s100_area10.lua b/src/open_samus_returns_rando/files/levels/s100_area10.lua index 44ce78c..bd150b8 100644 --- a/src/open_samus_returns_rando/files/levels/s100_area10.lua +++ b/src/open_samus_returns_rando/files/levels/s100_area10.lua @@ -210,6 +210,10 @@ end function s100_area10.OnMetroidDead() -- Disable the intro and the camera change triggers if a Metroid has been defeated, which means that Reverse Area 8 should be enabled Game.DisableTrigger("TG_Intro_Larva") + -- If going backwards, increment the Metroid counter on the first Metroid death only + if Blackboard.GetProp("DEFEATED_ENEMIES", "Metroid") == 1 and s100_area10.iMetroidTotalCountIncrements == 0 then + Game.AddSF(0.15, "s100_area10.IncrementMetroidTotalCount", "") + end if Game.GetEntity("TG_ChangeCamera_IntroLarva") ~= nil then Game.GetEntity("TG_ChangeCamera_IntroLarva").TRIGGER:DisableTrigger() end