Hi, I'm making a simple RPG that doesn't differentiate between physical and magical damage, it simply has one kind of attack and one kind of defense. The defense stat is repurposed for providing flat damage reduction in the form of an Armor stat. If you want an example, the first two Paper Mario games are probably the closest comparison I can think of, where almost all damage formulas are simply
for some function f.
The problem is that almost all my damage formulas end up off-by-one because characters are locked to having a minimum of 1 base DEF. There is no damage variance in this game. So if I'm using, say, a default Attack, then it should do
damage, but I have to account for 1 DEF on everyone making it the effective zero.
I could just treat 1 DEF as the baseline but then that runs into problems with things like defense-ignoring skills (such as one I will call Fireball) where I'm now manually reducing each output instance of damage by 1 to account for it, and there's just so many off-by-ones to handle that it feels like a bug waiting to happen.
It would be so much easier to have a base DEF of zero, since I don't plan to do any division by the DEF stat, but the editor doesn't allow this. Is there a way to change this limit somehow?
Markdown (GitHub flavored):
`f(user_atk, skill_damage) - (enemy_def)`
The problem is that almost all my damage formulas end up off-by-one because characters are locked to having a minimum of 1 base DEF. There is no damage variance in this game. So if I'm using, say, a default Attack, then it should do
Markdown (GitHub flavored):
`a.atk - b.def`
I could just treat 1 DEF as the baseline but then that runs into problems with things like defense-ignoring skills (such as one I will call Fireball) where I'm now manually reducing each output instance of damage by 1 to account for it, and there's just so many off-by-ones to handle that it feels like a bug waiting to happen.
It would be so much easier to have a base DEF of zero, since I don't plan to do any division by the DEF stat, but the editor doesn't allow this. Is there a way to change this limit somehow?