Fireblade225 wrote:
Damage per shot = tanh( attack*(random(0.6 to 1.666)) / (defense * 5) ) * damagecap
It is this formula you just have to solve it and make a few assumptions.
First that Damage per shot = damage cap
Second that is it the lowest possible outome so
damage cap= tanh( attack*0.6 / (defense * 5) ) * damagecap
divide both sides by damagecap gives
1= tanh( attack*0.6 / (defense * 5) )
tanh^-1(1) = undefined. So what you need is a number it can reach that the game would round up to the next integer up, damage cap-0.5. Then just rearrange in terms of attack.
attack = (defense*5*tanh^-1((damage cap-0.5)/damage cap))/0.6