Let's say I want to compare a.atk and b.def (attacker's attack value, and target's defense value), but then give several different results based on a range of values. For example:
if a.atk is less than half of b.def, dmg = a.atk / 2
if a.atk is between half and equal to b.def, dmg = a.atk
if a.atk is greater than 2x b.def, dmg = a.atk * 2
I might want to change the exact values here, and I also may want to expand to 5 different ranges instead of just 3, but that's the basic idea. Is there a way to fit this kind of conditional in the damage formula, and if so, what is the correct formulation?
Also, am I approaching too much complexity where I'm better off having the damage formula call something to a plugin file, where I can write out the formula in more detail (I remember being able to do this in vx ace, but never learned how in mv or mz).
Thank you so much in advance!
if a.atk is less than half of b.def, dmg = a.atk / 2
if a.atk is between half and equal to b.def, dmg = a.atk
if a.atk is greater than 2x b.def, dmg = a.atk * 2
I might want to change the exact values here, and I also may want to expand to 5 different ranges instead of just 3, but that's the basic idea. Is there a way to fit this kind of conditional in the damage formula, and if so, what is the correct formulation?
Also, am I approaching too much complexity where I'm better off having the damage formula call something to a plugin file, where I can write out the formula in more detail (I remember being able to do this in vx ace, but never learned how in mv or mz).
Thank you so much in advance!