health_scaling_effects
![code/datums/components/health_scaling_effects.dm 6](git.png)
Scales some statistics of a living mob (speed or attack power or such) based on how hurt it is.
Vars | |
additional_status_callback | A callback which is sent the mob's current ratio between the max and min values, for updating mob-specific effects |
---|---|
max_health_attack_modifier_lower | Modification to apply to the lower bound of your attack while your health is at or above the max threshold |
max_health_attack_modifier_upper | Modification to apply to the upper bound of your attack while your health is at or above the max threshold |
max_health_slowdown | Modification to movement speed to apply while your health is at or above the max threshold |
max_health_threshold | Health percentage (between 0 and 1) at which you are considered to get the full "max" effect |
min_health_attack_modifier_lower | Modification to apply to the lower bound of your attack while your health is at or above the min threshold |
min_health_attack_modifier_upper | Modification to apply to the upper bound of your attack while your health is at or above the min threshold |
min_health_slowdown | Modification to movement speed to apply while your health is at or above the min threshold |
min_health_threshold | Health percentage (between 0 and 1) at which you are considered to get the full "min" effect |
Procs | |
on_health_changed | Called when mob health changes, recalculates the ratio between maximum and minimum |
update_stats | Update statistics based on provided interpolator between maximum and minimum values |
Var Details
additional_status_callback
![code/datums/components/health_scaling_effects.dm 26](git.png)
A callback which is sent the mob's current ratio between the max and min values, for updating mob-specific effects
max_health_attack_modifier_lower
![code/datums/components/health_scaling_effects.dm 12](git.png)
Modification to apply to the lower bound of your attack while your health is at or above the max threshold
max_health_attack_modifier_upper
![code/datums/components/health_scaling_effects.dm 16](git.png)
Modification to apply to the upper bound of your attack while your health is at or above the max threshold
max_health_slowdown
![code/datums/components/health_scaling_effects.dm 20](git.png)
Modification to movement speed to apply while your health is at or above the max threshold
max_health_threshold
![code/datums/components/health_scaling_effects.dm 8](git.png)
Health percentage (between 0 and 1) at which you are considered to get the full "max" effect
min_health_attack_modifier_lower
![code/datums/components/health_scaling_effects.dm 14](git.png)
Modification to apply to the lower bound of your attack while your health is at or above the min threshold
min_health_attack_modifier_upper
![code/datums/components/health_scaling_effects.dm 18](git.png)
Modification to apply to the upper bound of your attack while your health is at or above the min threshold
min_health_slowdown
![code/datums/components/health_scaling_effects.dm 22](git.png)
Modification to movement speed to apply while your health is at or above the min threshold
min_health_threshold
![code/datums/components/health_scaling_effects.dm 10](git.png)
Health percentage (between 0 and 1) at which you are considered to get the full "min" effect
Proc Details
on_health_changed
Called when mob health changes, recalculates the ratio between maximum and minimum
update_stats
Update statistics based on provided interpolator between maximum and minimum values