mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
use Health::fraction
This commit is contained in:
parent
edddab997e
commit
e8ada67ae8
@ -744,8 +744,7 @@ fn execute_effect(
|
|||||||
stat.move_speed_multiplier *= 1.0 - *red;
|
stat.move_speed_multiplier *= 1.0 - *red;
|
||||||
},
|
},
|
||||||
BuffEffect::PoiseDamageFromLostHealth(strength) => {
|
BuffEffect::PoiseDamageFromLostHealth(strength) => {
|
||||||
let lost_health = health.maximum() - health.current();
|
stat.poise_damage_modifier *= 1.0 + (1.0 - health.fraction()) * *strength;
|
||||||
stat.poise_damage_modifier *= 1 + lost_health / 100.0 * *strength;
|
|
||||||
},
|
},
|
||||||
BuffEffect::AttackDamage(dam) => {
|
BuffEffect::AttackDamage(dam) => {
|
||||||
stat.attack_damage_modifier *= *dam;
|
stat.attack_damage_modifier *= *dam;
|
||||||
|
Loading…
Reference in New Issue
Block a user