Moved to MV Support
formula === 0 ? 1 : formula
Math.max(1, a.atk * meowever - b.def * meowever)
Can you explain how this works? Is the first number inside the brackets the result of the formula it will give minimally, instead of 0?Code:Math.max(1, a.atk * meowever - b.def * meowever)
Can you explain how this works? Is the first number inside the brackets the result of the formula it will give minimally, instead of 0?
Yup you are correct!I believe so. It's what I use, I never messed with it to know.
So I just tested this out:Yup you are correct!
Math.max(1, a.atk * 4 - b.def * 2)
My example was slightly shorthanded. Thus my mention of 1 being "solid number". Thanks for poking holes in my terrible math. =DActually, 1 + a.atk - b.def can still return 0
Math.max( Math.floor((Math.random() * 10) + 1), a.atk * Math.max( a.STRENGTH * 2/3, a.AGIL * 1/3 ) - b.def );
Interesting. How would you write this in English? I am a bit shy using a.atk squared, because this is what you would end up if you open up the parenthesis.(a.atk + STR + 20) * (a.atk) / (b.def + 20) + a.level