diff --git a/src/open_samus_returns_rando/files/pickups/randomizermissilelauncher.lua b/src/open_samus_returns_rando/files/pickups/randomizermissilelauncher.lua index 6bc1f31..98b2538 100644 --- a/src/open_samus_returns_rando/files/pickups/randomizermissilelauncher.lua +++ b/src/open_samus_returns_rando/files/pickups/randomizermissilelauncher.lua @@ -16,4 +16,7 @@ function RandomizerMissileLauncher.OnPickedUp(progression) RandomizerPowerup.OnPickedUp(progression) RandomizerPowerup.SetItemAmount("ITEM_MISSILE_TANKS", 0) RandomizerPowerup.IncreaseMissileCheckValue() + if RandomizerPowerup.GetItemAmount("ITEM_RESERVE_TANK_MISSILE") > 0 then + RandomizerPowerup.EnableMissileReserveTank() + end end diff --git a/src/open_samus_returns_rando/files/pickups/randomizerreservetankm.lua b/src/open_samus_returns_rando/files/pickups/randomizerreservetankm.lua index f050647..cc84a1d 100644 --- a/src/open_samus_returns_rando/files/pickups/randomizerreservetankm.lua +++ b/src/open_samus_returns_rando/files/pickups/randomizerreservetankm.lua @@ -5,8 +5,7 @@ end function RandomizerReserveTankM.OnPickedUp(progression) RandomizerPowerup.OnPickedUp(progression) - Blackboard.SetProp("GAME", "ITEM_RESERVE_TANK_MISSILE_ACTIVE", "b", true) - Blackboard.SetProp("GAME", "ITEM_RESERVE_TANK_MISSILE_FULL", "b", true) - Game.AddSF(0.0, "Game.HUDIdleScreenGo", "") - Game.AddSF(0.5, "Game.HUDIdleScreenLeave", "") + if RandomizerPowerup.GetItemAmount("ITEM_WEAPON_MISSILE_LAUNCHER") > 0 then + RandomizerPowerup.EnableMissileReserveTank() + end end \ No newline at end of file diff --git a/src/open_samus_returns_rando/files/templates/custom_init.lua b/src/open_samus_returns_rando/files/templates/custom_init.lua index 1acae8c..c2f9f04 100644 --- a/src/open_samus_returns_rando/files/templates/custom_init.lua +++ b/src/open_samus_returns_rando/files/templates/custom_init.lua @@ -24,8 +24,10 @@ function Init.InitGameBlackboard() Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_ADN", "f", current_amount + 1) end if string.sub(_FORV_3_, 1, 17) == "ITEM_RESERVE_TANK" then - Blackboard.SetProp("GAME", _FORV_3_ .. "_ACTIVE", "b", true) - Blackboard.SetProp("GAME", _FORV_3_ .. "_FULL", "b", true) + if _FORV_3_ ~= "ITEM_RESERVE_TANK_MISSILE" or Blackboard.GetProp("PLAYER_INVENTORY", "ITEM_WEAPON_MISSILE_LAUNCHER") then + Blackboard.SetProp("GAME", _FORV_3_ .. "_ACTIVE", "b", true) + Blackboard.SetProp("GAME", _FORV_3_ .. "_FULL", "b", true) + end end end Blackboard.SetProp("PLAYER_INVENTORY", "ITEM_METROID_COUNT", "f", 0) @@ -93,4 +95,4 @@ Game.SetForceSkipCutscenes(true) -- "s100_area10", -- "s110_surfaceb", -- } --- NextScenario = 1 \ No newline at end of file +-- NextScenario = 1 diff --git a/src/open_samus_returns_rando/files/templates/randomizerpowerup.lua b/src/open_samus_returns_rando/files/templates/randomizerpowerup.lua index 4e3fcc0..fe7e064 100644 --- a/src/open_samus_returns_rando/files/templates/randomizerpowerup.lua +++ b/src/open_samus_returns_rando/files/templates/randomizerpowerup.lua @@ -149,3 +149,10 @@ function RandomizerPowerup.IncreaseMissileCheckValue() RandomizerPowerup.SetItemAmount("ITEM_MISSILE_CHECK", RandomizerPowerup.GetItemAmount("ITEM_WEAPON_MISSILE_MAX")) end end + +function RandomizerPowerup.EnableMissileReserveTank() + Blackboard.SetProp("GAME", "ITEM_RESERVE_TANK_MISSILE_ACTIVE", "b", true) + Blackboard.SetProp("GAME", "ITEM_RESERVE_TANK_MISSILE_FULL", "b", true) + Game.AddSF(0.0, "Game.HUDIdleScreenGo", "") + Game.AddSF(0.5, "Game.HUDIdleScreenLeave", "") +end