i want to make a skill that deals more damage when the enemy hp is below 50% am i doing something wrong?
b.hp<mhp*0.5 ? a.atk*5-b.def*2: a.atk-b.def
b.hp<mhp*0.5 ? a.atk*5-b.def*2: a.atk-b.def
There is an hpRate() function in the system you can use:
b.hpRate() < .5 ? a.atk * 5 - b.def * 2 : a.atk - b.def
Original thread: https://forums.rpgmakerweb.com/threads/damage-formulas.169276/