jevydecky 2 Posted March 12, 2021 (edited) Hello, I need help with the damage formula that takes 75% of the target's current hp. I know that b.hp/2 will divide the current hp in half. Any help will be greatly appreciated Edited March 12, 2021 by jevydecky Share this post Link to post Share on other sites
Rikifive 3,411 Posted March 12, 2021 Hi, (b.hp*0.75).to_i -should deal 75 damage if the target would have 100 HP remaining, for example. The (x).to_i thing is to make sure, that the output is an integer, as I suspect it could end up throwing floats. Share this post Link to post Share on other sites
jevydecky 2 Posted March 12, 2021 48 minutes ago, Rikifive said: Hi, (b.hp*0.75).to_i -should deal 75 damage if the target would have 100 HP remaining, for example. The (x).to_i thing is to make sure, that the output is an integer, as I suspect it could end up throwing floats. Thank you Share this post Link to post Share on other sites