diff --git a/modules/biter_health_booster.lua b/modules/biter_health_booster.lua index 9bf0f4c1..44dfc2df 100644 --- a/modules/biter_health_booster.lua +++ b/modules/biter_health_booster.lua @@ -98,8 +98,11 @@ local function on_entity_damaged(event) end end + --Calculate current actual health, accounting for regeneration + local current_health = biter.health * (1 / health_pool[2]) + --Reduce health pool - health_pool[1] = health_pool[1] - event.final_damage_amount + health_pool[1] = current_health - event.final_damage_amount --Set entity health relative to health pool biter.health = health_pool[1] * health_pool[2]