customizable explode conditions
patf0rd opened this issue ยท 0 comments
When the original author added the hp.can_explode condition I started thinking about something more flexible since we have a variety of abilities based on some sort of HP-percentage (i.E. 6% Glowing Toxin, 10% Drain Blood, 15% Corpse Explosion, 40% Explode, etc.) and maybe see additions with different numbers or nerfs to existing ones that can be adjusted by script writers without the need for a code update.
So my idea was to have two conditions (or whatever they are categorized since I don't know how the values would be added) like:
hpp.s_explode.##
(s for source, used for abilities like Corpse Explosion that are looking into the MaxHP of the source)
Returns True if actual HP of the target is lower than maximum HP of source * ## / 100
hpp.t_explode.##
(t for target, used for abilities like Drain Blood that are looking into the MaxHP of the target)
Returns True if actual HP of the target is lower than maximum HP of target * ## / 100