Remove some debugging prints, fix -skillpoint weapon bug
This commit is contained in:
parent
ced13fd9b8
commit
9332d6575b
4 changed files with 6 additions and 8 deletions
|
@ -20,7 +20,7 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
|
||||||
neutralRemainingRaw[0] = Math.floor(neutralRemainingRaw[0] - min_diff);
|
neutralRemainingRaw[0] = Math.floor(neutralRemainingRaw[0] - min_diff);
|
||||||
neutralRemainingRaw[1] = Math.floor(neutralRemainingRaw[1] - max_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]];
|
let rawBoosts = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]];
|
||||||
for (const powderID of weapon.get("powders")) {
|
for (const powderID of weapon.get("powders")) {
|
||||||
const powder = powderStats[powderID];
|
const powder = powderStats[powderID];
|
||||||
|
|
|
@ -38,10 +38,8 @@ function expandItem(item, powders){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const id of nonRolledIDs){
|
for (const id of nonRolledIDs){
|
||||||
if(item[id]){
|
|
||||||
expandedItem.set(id,item[id]);
|
expandedItem.set(id,item[id]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
expandedItem.set("minRolls",minRolls);
|
expandedItem.set("minRolls",minRolls);
|
||||||
expandedItem.set("maxRolls",maxRolls);
|
expandedItem.set("maxRolls",maxRolls);
|
||||||
expandedItem.set("powders", powders);
|
expandedItem.set("powders", powders);
|
||||||
|
@ -408,7 +406,6 @@ function displaySpellDamage(parent_elem, build, spell, spellIdx) {
|
||||||
part_div.append(nonCritLabel);
|
part_div.append(nonCritLabel);
|
||||||
|
|
||||||
let damageClasses = ["Neutral","Earth","Thunder","Water","Fire","Air"];
|
let damageClasses = ["Neutral","Earth","Thunder","Water","Fire","Air"];
|
||||||
console.log(results);
|
|
||||||
for (let i = 0; i < 6; i++){
|
for (let i = 0; i < 6; i++){
|
||||||
if (results[i][1] > 0){
|
if (results[i][1] > 0){
|
||||||
let p = document.createElement("p");
|
let p = document.createElement("p");
|
||||||
|
|
|
@ -63,10 +63,11 @@ function calculate_skillpoints(equipment, weapon) {
|
||||||
let best_skillpoints = [0, 0, 0, 0, 0];
|
let best_skillpoints = [0, 0, 0, 0, 0];
|
||||||
let best_total = Infinity;
|
let best_total = Infinity;
|
||||||
|
|
||||||
|
let allFalse = [false, false, false, false, false];
|
||||||
if (consider.length > 0 || noboost.length > 0) {
|
if (consider.length > 0 || noboost.length > 0) {
|
||||||
// Try every combination and pick the best one.
|
// Try every combination and pick the best one.
|
||||||
for (let permutation of perm(consider)) {
|
for (let permutation of perm(consider)) {
|
||||||
let has_skillpoint = [false, false, false, false, false];
|
let has_skillpoint = allFalse.slice();
|
||||||
|
|
||||||
permutation = permutation.concat(noboost);
|
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];
|
needed_skillpoints = result[0];
|
||||||
total_diff = result[1];
|
total_diff = result[1];
|
||||||
for (let i = 0; i < 5; ++i) {
|
for (let i = 0; i < 5; ++i) {
|
||||||
|
|
2
test.js
2
test.js
|
@ -11,7 +11,7 @@ console.log(url_tag);
|
||||||
* END testing section
|
* 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+")";
|
document.getElementById("header").textContent = "Wynn build calculator "+BUILD_VERSION+" (db version "+DB_VERSION+")";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue