In crabking.lua, there is a line that reads:
mob.components.health:SetMaxHealth(mob.components.health.currenthealth + (math.floor(inst.gemcount.purple+1/2) * TUNING.CRABKING_MOB_HEALTH_BONUS) )
Because there are no parentheses around inst.gem.count.purple+1, order of operations means 2 will only be divided from 1, not fromĀ inst.gem.count.purple+1. As such, math.floor will always return inst.gemcount.purple, meaning crab king mob health increases for each gem as opposed to each 2 gems.
To fix this, just put parentheses aroundĀ inst.gem.count.purple+1 like so:
mob.components.health:SetMaxHealth(mob.components.health.currenthealth + (math.floor((inst.gemcount.purple+1)/2) * TUNING.CRABKING_MOB_HEALTH_BONUS) )
Steps to Reproduce
Read code
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now