Remove some debugging prints, fix -skillpoint weapon bug

This commit is contained in:
b 2021-01-09 07:15:30 -06:00
parent ced13fd9b8
commit 9332d6575b
4 changed files with 6 additions and 8 deletions

View file

@ -20,7 +20,7 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
neutralRemainingRaw[0] = Math.floor(neutralRemainingRaw[0] - min_diff);
neutralRemainingRaw[1] = Math.floor(neutralRemainingRaw[1] - max_diff);
}
console.log(damages);
//console.log(damages);
let rawBoosts = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]];
for (const powderID of weapon.get("powders")) {
const powder = powderStats[powderID];

View file

@ -38,9 +38,7 @@ function expandItem(item, powders){
}
}
for (const id of nonRolledIDs){
if(item[id]){
expandedItem.set(id,item[id]);
}
expandedItem.set(id,item[id]);
}
expandedItem.set("minRolls",minRolls);
expandedItem.set("maxRolls",maxRolls);
@ -408,7 +406,6 @@ function displaySpellDamage(parent_elem, build, spell, spellIdx) {
part_div.append(nonCritLabel);
let damageClasses = ["Neutral","Earth","Thunder","Water","Fire","Air"];
console.log(results);
for (let i = 0; i < 6; i++){
if (results[i][1] > 0){
let p = document.createElement("p");

View file

@ -63,10 +63,11 @@ function calculate_skillpoints(equipment, weapon) {
let best_skillpoints = [0, 0, 0, 0, 0];
let best_total = Infinity;
let allFalse = [false, false, false, false, false];
if (consider.length > 0 || noboost.length > 0) {
// Try every combination and pick the best one.
for (let permutation of perm(consider)) {
let has_skillpoint = [false, false, false, false, false];
let has_skillpoint = allFalse.slice();
permutation = permutation.concat(noboost);
@ -120,7 +121,7 @@ function calculate_skillpoints(equipment, weapon) {
// }
// }
// }
result = apply_to_fit(skillpoints, weapon);
result = apply_to_fit(skillpoints, weapon, allFalse);
needed_skillpoints = result[0];
total_diff = result[1];
for (let i = 0; i < 5; ++i) {

View file

@ -11,7 +11,7 @@ console.log(url_tag);
* END testing section
*/
const BUILD_VERSION = "2.7";
const BUILD_VERSION = "2.8";
document.getElementById("header").textContent = "Wynn build calculator "+BUILD_VERSION+" (db version "+DB_VERSION+")";