You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the register_on_player_hpchange you decide when to apply damage and when heal catches it.
You could make it a public function, so that we can override it.
You could make the globalstep function public as well, so we can add custom aoe
You could iterate through a table of damage sources, which bring damage functions with them
This way, a game could select to apply the heal (rather a "deflect") value to falling damage or to ignore it. Imagine falling off a cliff in full plate mail. Sure, the plate would prevent bruises, but the person would die regardless of sudden deceleration.
Also, set_hp allows to provide custom reasons. In a game where laser damage is a thing and a coat of mirrors deflects lazer pew pew, but not missiles, they could specify set_hp(1000,"pewpew") on hit. My game will introduce blunt, slash and stab damage, also magic and others, even combinations of those.
Sometimes, we want to kill people.
Then we do player:set_hp(0), but if the armor the player wears has some healing properties, we can't kill them.
Repro:
=> In some cases, you are still alive. Other mods may also have this issue
IMO set_hp(0) should do exactly that: kill the player.
Also, fall damage seems to count against the heal property.
Could you please make it that high fall damage and set_hp(0) does not let anyone live?
Or could you make it that armors can register against what type of damage they help?
For my reference 998
The text was updated successfully, but these errors were encountered: