Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mediumSlowEXPTable = [NaN,
- 0, 9, 57, 96, 135, 179, 236, 314, 419, 560,
- 742, 973, 1261, 1612, 2035, 2535, 3120, 3798, 4575, 5460,
- 6458, 7577, 8825, 10208, 11735, 13411, 15244, 17242, 19411, 21760,
- 24294, 27021, 29949, 33084, 36435, 40007, 43808, 47846, 52127, 56660,
- 61450, 66505, 71833, 77440, 83335, 89523, 96012,102810, 109923, 117360,
- 125126,133229,141677,150476,159635,169159,179056,189334, 199999, 211060,
- 222522,234393,246681,259392,272535,286115,300140,314618, 329555, 344960,
- 360838,377197,394045,411388,429235,447591,466464,485862, 505791, 526260,
- 547274,568841,590969,613664,636935,660787,685228,710266, 735907, 762160,
- 789030,816525,844653,873420,902835,932903,963632,995030,1027103,1059860];
- /**
- * Gives the total EXP for a Level for a Pokemon in the Medium Slow experience group.
- *
- * @param {number} input The Level of the Pokemon.
- * @return The total EXP of the Pokemon at that Level.
- * @customfunction
- */
- function mediumSlow(Level) {
- //EXP = ((1.2*Math.pow(Level,3)|0) - (15*Math.pow(Level,2)) + (100*Level) - 140)|0;
- //if (EXP<0) EXP = 0;
- EXP = mediumSlowEXPTable[Level];
- return EXP;
- }
- /**
- * Calculates the experience gain that a Rare Candy replaces.
- *
- * @param {number} EXPTotal The current experience total.
- * @param {number} NewLevel The goal level.
- * @return The experience gain replaced by the Rare Candy.
- * @customfunction
- */
- function EXPGAINCANDY(EXPTotal,NewLevel) {
- EXPGain = mediumSlow(NewLevel) - EXPTotal;
- return EXPGain;
- }
- /**
- * Gives the Level for a Pokemon in the Medium Slow experience group at any given experience total.
- *
- * @param {number} input The current experience total of the Pokemon.
- * @return The level of the Pokemon at that experience total.
- * @customfunction
- */
- function mediumSlowLevel(EXPTotal) {
- for(i=1;mediumSlowEXPTable[i]<EXPTotal;i++);
- if(mediumSlowEXPTable[i]==EXPTotal) return i;
- if(mediumSlowEXPTable[i]>EXPTotal) return i-1;
- }
Advertisement
Add Comment
Please, Sign In to add comment