Currently working on a damage formula:
x = (Math.randomInt(20) + 1); if (x >= 20) { ((Math.randomInt(8) + 1) * 2) +((a.level / 5) + 2) +((a.atk - 10) /2);} else if (x + ((a.atk - 10) / 2) + ((a.level / 5) + 2) <= b.def) { 0 ; } else { (Math.randomInt(8) + 1) + ((a.atk - 10) / 2) + ((a.level / 5) + 2); }
Got critting coverd though im still trying to figure out how i can make it appear onscreen like this(not realy important and can live without but still).
Normal hit dont but that leaves...
(x + ((a.atk - 10) / 2) + ((a.level / 5) + 2) <= b.def) { 0 ; } refers to a attack missing but currently it deals damage. True its 0, but 0 damage is as far i know a hit.
x = (Math.randomInt(20) + 1); if (x >= 20) { ((Math.randomInt(8) + 1) * 2) +((a.level / 5) + 2) +((a.atk - 10) /2);} else if (x + ((a.atk - 10) / 2) + ((a.level / 5) + 2) <= b.def) { 0 ; } else { (Math.randomInt(8) + 1) + ((a.atk - 10) / 2) + ((a.level / 5) + 2); }
Got critting coverd though im still trying to figure out how i can make it appear onscreen like this(not realy important and can live without but still).
Normal hit dont but that leaves...
(x + ((a.atk - 10) / 2) + ((a.level / 5) + 2) <= b.def) { 0 ; } refers to a attack missing but currently it deals damage. True its 0, but 0 damage is as far i know a hit.