From e8ada67ae8ff06528f09d6570e74c30d4929dbc7 Mon Sep 17 00:00:00 2001 From: do-no-van Date: Thu, 15 Feb 2024 00:09:31 +0000 Subject: [PATCH] use Health::fraction --- common/systems/src/buff.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/systems/src/buff.rs b/common/systems/src/buff.rs index 4d9ecb6968..47e3a402fa 100644 --- a/common/systems/src/buff.rs +++ b/common/systems/src/buff.rs @@ -744,8 +744,7 @@ fn execute_effect( stat.move_speed_multiplier *= 1.0 - *red; }, BuffEffect::PoiseDamageFromLostHealth(strength) => { - let lost_health = health.maximum() - health.current(); - stat.poise_damage_modifier *= 1 + lost_health / 100.0 * *strength; + stat.poise_damage_modifier *= 1.0 + (1.0 - health.fraction()) * *strength; }, BuffEffect::AttackDamage(dam) => { stat.attack_damage_modifier *= *dam;