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

Commit

Permalink
Fix multiplier undercap
Browse files Browse the repository at this point in the history
  • Loading branch information
ShamblesSM committed Feb 13, 2023
1 parent 0058351 commit 0e9c196
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Level.lua
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,18 @@ function Level:updateLogic(dt)

-- Zuma style powerups
if self.started and not self.finish and not self:areAllObjectivesReached() and not self:getEmpty() then
local powerups = self.powerupList
local powerups = {}
for _,v in pairs(self.powerupList) do
table.insert(powerups, v)
end

local multiplierCap = 9
local raiseCap = _MathAreKeysInTable(_Game:getCurrentProfile():getEquippedFoodItemEffects(), "multiplierCapAdditiveModifier")
if raiseCap then
multiplierCap = multiplierCap + raiseCap
if raiseCap then
multiplierCap = multiplierCap + raiseCap
end
-- Don't spawn multipliers if we've hit the cap
if self.multiplier >= multiplierCap-1 then
if self.multiplier >= multiplierCap then
local pCount = 1
for _,v in pairs(powerups) do
if v == "multiplier" then
Expand Down

0 comments on commit 0e9c196

Please sign in to comment.