Skip to content

Commit

Permalink
Update rupture_resonance.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Luan Luciano authored Jan 20, 2024
1 parent b060f40 commit 43277b6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ function ruptureResonance.onThink(creature)
return false
end

local ruptureResonanceStage = Game.getStorageValue(GlobalStorage.HeartOfDestruction.RuptureResonanceStage)
local ruptureResonanceStage = Game.getStorageValue(GlobalStorage.HeartOfDestruction.RuptureResonanceStage) > 0 and Game.getStorageValue(GlobalStorage.HeartOfDestruction.RuptureResonanceStage) or 0
local resonanceActive = Game.setStorageValue(GlobalStorage.HeartOfDestruction.RuptureResonanceActive)

local hpPercent = (creature:getHealth() / creature:getMaxHealth()) * 100
if hpPercent <= 80 and ruptureResonanceStage == 0 and resonanceActive ~= 1 then
createSpawnWave(1)
elseif hpPercent <= 60 and ruptureResonanceStage == 1 and resonanceActive ~= 1 then
createSpawnWave(2)
Game.setStorageValue(GlobalStorage.HeartOfDestruction.RuptureResonanceStage, 0)
elseif hpPercent <= 40 and ruptureResonanceStage == 2 and resonanceActive ~= 1 then
createSpawnWave(3)
elseif hpPercent <= 25 and ruptureResonanceStage == 3 and resonanceActive ~= 1 then
Expand Down

0 comments on commit 43277b6

Please sign in to comment.