Fix air prison (and external stats calc in general)

This commit is contained in:
b 2021-02-27 13:07:28 -08:00
parent 25261bab67
commit c8a99e1cc6
3 changed files with 6 additions and 6 deletions

View file

@ -2,7 +2,7 @@ const url_tag = location.hash.slice(1);
console.log(url_base); console.log(url_base);
console.log(url_tag); console.log(url_tag);
const BUILD_VERSION = "6.9.36"; const BUILD_VERSION = "6.9.37";
function setTitle() { function setTitle() {
let text; let text;
@ -819,7 +819,7 @@ function calculateBuildStats() {
} }
for (const [setName, count] of player_build.activeSetCounts) { for (const [setName, count] of player_build.activeSetCounts) {
const bonus = sets[setName].bonuses[count-1]; const bonus = sets[setName].bonuses[count-1];
console.log(setName); // console.log(setName);
if (bonus["illegal"]) { if (bonus["illegal"]) {
let setWarning = document.createElement("p"); let setWarning = document.createElement("p");
setWarning.classList.add("itemp"); setWarning.classList.add("itemp");

View file

@ -6,9 +6,9 @@ function calculateSpellDamage(stats, spellConversions, rawModifier, pctModifier,
let buildStats = new Map(stats); let buildStats = new Map(stats);
if(externalStats) { //if nothing is passed in, then this hopefully won't trigger if(externalStats) { //if nothing is passed in, then this hopefully won't trigger
for (let i = 0; i < externalStats.length; i++) { for (const entry of externalStats) {
const key = externalStats[i][0]; const key = entry[0];
const value = externalStats[i][1]; const value = entry[1];
if (typeof value === "number") { if (typeof value === "number") {
buildStats.set(key, buildStats.get(key) + value); buildStats.set(key, buildStats.get(key) + value);
} else if (Array.isArray(value)) { } else if (Array.isArray(value)) {

View file

@ -741,7 +741,7 @@ function displayExpandedItem(item, parent_id){
effects = powderSpecial["armorSpecialEffects"]; effects = powderSpecial["armorSpecialEffects"];
specialTitle.textContent += powderSpecial["armorSpecialName"] + ": "; specialTitle.textContent += powderSpecial["armorSpecialName"] + ": ";
} }
console.log(effects); // console.log(effects);
for (const [key,value] of effects.entries()) { for (const [key,value] of effects.entries()) {
if (key !== "Description") { if (key !== "Description") {
let effect = document.createElement("p"); let effect = document.createElement("p");