Jump to content

CK Tower Health Upgrades at only 4 Yellow Gems


JazzyGames
  • Pending

From SpawnCannonTower() within crabking.lua: 
"tower.components.health:SetMaxHealth((math.floor(inst.gemcount.yellow/4)+1) * TUNING.CRABKING_CANNONTOWER_HEALTH )"

This will create a multiplier of 2 on the tower health value if the yellow gem count is 4. If the intent was for the health to upgrade at level five and eight then we probably want something more like this:

local towerhealth = TUNING.CRABKING_CANNONTOWER_HEALTH
local towerhealthmult = 1
if inst.gemcount.yellow > 4 then towerhealthmult = towerhealthmult + 1
if inst.gemcount.yellow > 7 then towerhealthmult = towerhealthmult + 1
if inst.gemcount.yellow > 10 then towerhealthmult = towerhealthmult + 1
tower.components.health:SetMaxHealth(towerhealth * towerhealthmult)


Please forgive my lua if it's wrong, and please disregard if the breakpoint is already working as intended.

EDIT: Fixed. Feel free to close.


Steps to Reproduce

Start a CK fight with 4 yellow gems socketed. Observe how the tower health is already doubled.

  • Like 1



User Feedback


There are no comments to display.



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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...