use Health::fraction

This commit is contained in:
do-no-van 2024-02-15 00:09:31 +00:00
parent edddab997e
commit e8ada67ae8

View File

@ -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;