From b7e07e87e5ea2af81a458a259414e070a8caa01a Mon Sep 17 00:00:00 2001 From: giantcavespider Date: Mon, 18 Nov 2024 10:06:01 -0600 Subject: [PATCH] tweak fall damage again --- stats/monster_primary.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stats/monster_primary.lua b/stats/monster_primary.lua index ee80df247b..211efe797a 100644 --- a/stats/monster_primary.lua +++ b/stats/monster_primary.lua @@ -149,7 +149,10 @@ function update(dt) if self.fallDistance > minimumFallDistance and -self.lastYVelocity > minimumFallVel and mcontroller.onGround() and not inLiquid() then --fall damage is proportional to max health, with 100.0 being the player's standard - local healthRatio = math.sqrt(status.stat("maxHealth") / 100.0) + local healthRatio = status.stat("maxHealth") / 100.0 + if healthRatio > 1.0 then + healthRatio = math.sqrt(healthRatio) + end local damage = (self.fallDistance - minimumFallDistance) * fallDistanceDamageFactor damage = damage * (1.0 + (world.gravity(mcontroller.position()) - baseGravity) * gravityDiffFactor)