diff --git a/quant.ew/files/system/local_health/local_health.lua b/quant.ew/files/system/local_health/local_health.lua index 94ddb133..8732d664 100644 --- a/quant.ew/files/system/local_health/local_health.lua +++ b/quant.ew/files/system/local_health/local_health.lua @@ -376,6 +376,13 @@ ctx.cap.health = { reduce_hp() else polymorph.switch_entity(end_poly_effect(ctx.my_player.entity)) + local _, max_hp_new, has_hp = util.get_ent_health(ctx.my_player.entity) + if not ctx.my_player.currently_polymorphed and has_hp then + -- Restore the player back to small amount of hp. + local new_hp = 3 * max_hp_new / 20 + local final_hp = math.max(new_hp, math.min(2/5, max_hp_new)) + util.set_ent_health(ctx.my_player.entity, {final_hp, max_hp_new}) + end async(function() wait(1) player_died()