Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Ensure multiplier does not go above cap
Browse files Browse the repository at this point in the history
  • Loading branch information
ShamblesSM committed Feb 13, 2023
1 parent 0e9c196 commit 80a6ddc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Level.lua
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function Level:updateLogic(dt)
if self.multiplier >= multiplierCap then
local pCount = 1
for _,v in pairs(powerups) do
if v == "multiplier" then
if v == "multiplier" then
table.remove(powerups, pCount)
end
pCount = pCount + 1
Expand Down Expand Up @@ -293,7 +293,8 @@ function Level:updateLogic(dt)
-- Traverse through all the spheres one more time and remove any multiplier powerups if
-- we've reached the cap
-- TODO: Is there a better way to traverse every sphere? Might need to add a new function
if self.multiplier >= multiplierCap-1 then
if self.multiplier >= multiplierCap then
self.multiplier = multiplierCap
for _, path in pairs(self.map.paths) do
for _, sphereChain in pairs(path.sphereChains) do
for _, sphereGroup in pairs(sphereChain.sphereGroups) do
Expand Down
1 change: 0 additions & 1 deletion src/Path.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ function Path:update(dt)

local shouldGiveOneSecond = _MathAreKeysInTable(_Game:getCurrentProfile():getEquippedFoodItemEffects(), "curveClearsGiveOneSecond")
if (not self.map.level.finish) and shouldGiveOneSecond then
print("eep")
self.map.level:applyEffect({type = "addTime", amount = 1})
end

Expand Down

0 comments on commit 80a6ddc

Please sign in to comment.