Hey there. To provide context, I'm making a skill named 'Tri Jabs', which involves the user punching the target thrice. Each punch has a power of 70%-90% ATK before reductions from DEF, but if the punch is a critical hit, it bypasses DEF completely. This is the current damage formula: a.atk * (0.7 + (Math.random()*20 / 100)) - (b.result().critical ? 0 : b.def).
So here's the thing, I want to make it so that if any of the three jabs deals over 15% of the target's remaining HP, it inflicts a state on the enemy (in this case, a debuff called 'Disoriented'). But I've no idea how to code this effect in the damage formula, or if it can be done without plugins.
Would really appreciate any suggestions.
So here's the thing, I want to make it so that if any of the three jabs deals over 15% of the target's remaining HP, it inflicts a state on the enemy (in this case, a debuff called 'Disoriented'). But I've no idea how to code this effect in the damage formula, or if it can be done without plugins.
Would really appreciate any suggestions.