View Single Post
Old 09-12-2012, 09:42 AM
paperfairy's Avatar
paperfairy Offline
Join Date: Mar 2004
Location: Manchester, Connecticut
Posts: 3,991
Send a message via AIM to paperfairy Send a message via Skype™ to paperfairy
Default Re: ASB Odd Jobs [NEW JOB! (10/02/2011 5:54 GMT -4)]

$15 to narphoenix for finding the following bug... it's pretty game breaking (and embarassing!)

Originally Posted by narphoenix
Originally Posted by paperfairy
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+(10-EXP))+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: = Math.ceil(Math.pow((BP * (0.05) * NRGS), (1 + ((10 - parseFloat(battle_EXP[1])) / 10))) + parseFloat(M)); = 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+(10-EXP))
parseFloat(M) = M

But thanks anyways!

Ok, let's use an example:

Staryu used Thunderbolt!

Compendium gives energy usage at: 24

Formula yields:


BP=95; S=1.5; EXP=4; M=0 (all from the compendium)


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.
Or yet in wise old Ravenclaw
If you've a ready mind
Where those of wit and learning

Will always find their kind.
ASBL | twins with Jenn <3