$15 to narphoenix for finding the following bug... it's pretty game breaking (and embarassing!)
Quote:
Originally Posted by narphoenix
Quote:
Originally Posted by paperfairy
Quote:
Originally Posted by narphoenix
Hello Justin,
In the "Formulae" section of the Compendium, the formula for Energy output generates ridiculously higher numbers than it should (based on the number the simulator spit out). The formula as written is "((BP/20)*S)^(1+(10EXP))+M. The exponentiation in the formula creates such a ridiculously large number that most attack attacks a Pokemon could use (according to the formula) would make the Pokemon basically faint instantly from lack of energy.

Unfortunately, you are incorrect. The following is the code straight from the Compendium:
Code:
document.calculator.energy.value = Math.ceil(Math.pow((BP * (0.05) * NRGS), (1 + ((10  parseFloat(battle_EXP[1])) / 10))) + parseFloat(M));
document.calculator.energy.value = Final Energy Value
Math.ceil = Round Up
Math.pow(x,y) = x^y
(BP * (0.05) * NRGS) = x = (BP/20)*S)
(1 + ((10  parseFloat(battle_EXP[1])) / 10) = y = (1+(10EXP))
parseFloat(M) = M
But thanks anyways!

Ok, let's use an example:
Staryu used Thunderbolt!
Compendium gives energy usage at: 24
Formula yields:
((BP/20)*S)^(1+(10EXP))+M
BP=95; S=1.5; EXP=4; M=0 (all from the compendium)
((95/20)*1.5)^(1+(104))+0=
(4.75*1.5)^(1+6)=
(7.125)^(7)=
932,167.765232563
I might be wrong, but I believe there is a slight difference between the two numbers. Just a thought.

I forgot to divide part of the exponent by ten in the formulae page. Ugh.