I'm trying to make a damage formula that increases the base damage by 0.5 for every 1% of HP lost. I've been running with the following equation, which I've tested in Python:
Now, the issue is that it only returns 120 every time. I've realized the issue lies in the
As it only returns 0. Anything I can do?
(Also, I am aware of Yanfly Lunatic and that it has a script for this. However, that requires Lunatic damage and, considering the amount of scripts I have that interact with the damage formula box, I don't want to potentially do more damage control for just one move.
Code:
((120*(a.atk / b.def))+((120*(a.atk / b.def))*((a.mhp-a.hp)/a.mhp)*0.5));
Code:
((a.mhp-a.hp)/a.mhp)
(Also, I am aware of Yanfly Lunatic and that it has a script for this. However, that requires Lunatic damage and, considering the amount of scripts I have that interact with the damage formula box, I don't want to potentially do more damage control for just one move.