Skip to content

Commit

Permalink
Fix if clause
Browse files Browse the repository at this point in the history
  • Loading branch information
dyceron authored Dec 28, 2023
1 parent 280a191 commit 353b56a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/open_samus_returns_rando/files/levels/s070_area7.lua
Original file line number Diff line number Diff line change
Expand Up @@ -896,9 +896,10 @@ function s070_area7.OnStartManicMinerBotDeathCutscene()
Game.AddEntityToUpdateInCutscene("LE_ManicMinerWall")
Game.AddEntityToUpdateInCutscene("LE_PowerUp_Powerbomb")
Scenario.WriteToBlackboard("manicMinerDead", "b", true)
if PBLauncher + Game.GetItemAmount(Game.GetPlayerName(), "ITEM_WEAPON_POWER_BOMB") > 0 then
if PBLauncher ~= 0 and Game.GetItemAmount(Game.GetPlayerName(), "ITEM_WEAPON_POWER_BOMB") == 0 then
local locked_pbs = Game.GetItemAmount(Game.GetPlayerName(), "ITEM_POWER_BOMB_TANKS")
Game.SetItemAmount(Game.GetPlayerName(), "ITEM_WEAPON_POWER_BOMB", 1)
Game.SetItemAmount(Game.GetPlayerName(), "ITEM_WEAPON_POWER_BOMB_MAX", "ITEM_POWER_BOMB_TANKS")
Game.SetItemAmount(Game.GetPlayerName(), "ITEM_WEAPON_POWER_BOMB_MAX", locked_pbs)
Game.SetItemAmount(Game.GetPlayerName(), "ITEM_POWER_BOMB_TANKS", 0)
end
end
Expand Down

0 comments on commit 353b56a

Please sign in to comment.