diff --git a/TODO.txt b/TODO.txt index 22632df..aa7e1a6 100644 --- a/TODO.txt +++ b/TODO.txt @@ -10,3 +10,6 @@ Damage calculation Skillpoint engine - Make it work... + +Item DB searcher +- Make it \ No newline at end of file diff --git a/build.js b/build.js index 79fc017..3c62161 100644 --- a/build.js +++ b/build.js @@ -1,3 +1,45 @@ +/*Turns the input amount of skill points into a float precision percentage. +* @param skp - the integer skillpoint count to be converted +*/ +function skillPointsToPercentage(skp){ + if (skp<=0){ + return 0.0; + }else if(skp>=150){ + return 0.808; + }else{ + return(-0.0000000066695* Math.pow(Math.E, -0.00924033 * skp + 18.9) + 1.0771); + //return(-0.0000000066695* Math.pow(Math.E, -0.00924033 * skp + 18.9) + 1.0771).toFixed(3); + } +} + +/*Turns the input amount of levels into skillpoints available. +* +* @param level - the integer level count te be converted +*/ +function levelToSkillPoints(level){ + if(level < 1){ + return 0; + }else if(level >= 101){ + return 200; + }else{ + return (level - 1) * 2; + } +} + +/*Turns the input amount of levels in to base HP. +* @param level - the integer level count to be converted +*/ +function levelToHPBase(level){ + if(level < 1){ //bad level + return this.levelToHPBase(1); + }else if (level > 106){ //also bad level + return this.levelToHPBase(106); + }else{ //good level + return 5*level + 5; + } +} + + /*Class that represents a wynn player's build. */ class Build{ diff --git a/index.html b/index.html index dddd15f..372e11b 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@