dummy commit

This commit is contained in:
ferricles 2021-02-12 09:00:06 -08:00
parent 0d2498d934
commit c826d91b8f
4 changed files with 13 additions and 5 deletions

View file

@ -2,14 +2,16 @@
* @param skp - the integer skillpoint count to be converted * @param skp - the integer skillpoint count to be converted
*/ */
function skillPointsToPercentage(skp){ function skillPointsToPercentage(skp){
if (skp<=0){ /*if (skp<=0){
return 0.0; return 0.0;
}else if(skp>=150){ }else if(skp>=150){
return 0.808; return 0.808;
}else{ }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);
//return(-0.0000000066695* Math.pow(Math.E, -0.00924033 * skp + 18.9) + 1.0771).toFixed(3); //return(-0.0000000066695* Math.pow(Math.E, -0.00924033 * skp + 18.9) + 1.0771).toFixed(3);
} }*/
//return Math.min(Math.max(0.00,(-0.0000000066695* Math.pow(Math.E, -0.00924033 * skp + 18.9) + 1.0771)),.808);
return clamp((-0.0000000066695* Math.pow(Math.E, -0.00924033 * skp + 18.9) + 1.0771), 0.00, 0.808);
} }
/*Turns the input amount of levels into skillpoints available. /*Turns the input amount of levels into skillpoints available.

View file

@ -178,7 +178,7 @@ class Craft{
} }
if (statMap.get("category") === "weapon") { if (statMap.get("category") === "weapon") {
//attack damages oh boy //attack damages oh boy
let ratio = 2.05; //UNSURE IF THIS IS HOW IT'S DONE. let ratio = 2.05;
if (this['atkSpd'] === "SLOW") { if (this['atkSpd'] === "SLOW") {
ratio /= 1.5; ratio /= 1.5;
} else if (this['atkSpd'] === "NORMAL") { } else if (this['atkSpd'] === "NORMAL") {
@ -248,7 +248,7 @@ class Craft{
} }
/* END SECTION */ /* END SECTION */
//calc ingredient effectivenesses -> see https://wynndata.tk/cr/585765168
let eff = [[100,100],[100,100],[100,100]]; let eff = [[100,100],[100,100],[100,100]];
for (let n in this.ingreds) { for (let n in this.ingreds) {
let ingred = this.ingreds[n]; let ingred = this.ingreds[n];

View file

@ -43,8 +43,10 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
} }
//console.log(damages); //console.log(damages);
let rawBoosts = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]]; let rawBoosts = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]];
//Double powder apply for weapons
let powders = weapon.get("powders").slice(); let powders = weapon.get("powders").slice();
//Double powder apply for weapons - this implementation is wrong
if (weapon.get("tier") === "Crafted") { if (weapon.get("tier") === "Crafted") {
powders = powders.flatMap(x => [x,x]); powders = powders.flatMap(x => [x,x]);
} }

View file

@ -14,6 +14,10 @@ let consumableTypes = [ "potion", "scroll", "food"];
let elementIcons = ["\u2724","\u2726", "\u2749", "\u2739", "\u274b" ]; let elementIcons = ["\u2724","\u2726", "\u2749", "\u2739", "\u274b" ];
let skpReqs = skp_order.map(x => x + "Req"); let skpReqs = skp_order.map(x => x + "Req");
function clamp(num, low, high){
return Math.min(Math.max(num, low), high);
}
// Permutations in js reference (also cool algorithm): // Permutations in js reference (also cool algorithm):
// https://stackoverflow.com/a/41068709 // https://stackoverflow.com/a/41068709
function perm(a){ function perm(a){