Bump version, fix bug with nonexistent ids

This commit is contained in:
b 2021-01-09 07:25:19 -06:00
parent 9332d6575b
commit b1f01b83a2
2 changed files with 14 additions and 16 deletions

View file

@ -17,23 +17,21 @@ function expandItem(item, powders){
} }
}else{ //The item does not have fixed IDs. }else{ //The item does not have fixed IDs.
for (const id of rolledIDs){ for (const id of rolledIDs){
if(item[id]){ if(item[id] > 0){ // positive rolled IDs
if(item[id] > 0){ // positive rolled IDs minRolls.set(id,idRound(item[id]*0.3));
minRolls.set(id,idRound(item[id]*0.3)); maxRolls.set(id,idRound(item[id]*1.3));
}else if(item[id] < 0){ //negative rolled IDs
if (reversedIDs.includes(id)) {
maxRolls.set(id,idRound(item[id]*1.3)); maxRolls.set(id,idRound(item[id]*1.3));
}else if(item[id] < 0){ //negative rolled IDs minRolls.set(id,idRound(item[id]*0.7));
if (reversedIDs.includes(id)) {
maxRolls.set(id,idRound(item[id]*1.3));
minRolls.set(id,idRound(item[id]*0.7));
}
else {
minRolls.set(id,idRound(item[id]*1.3));
maxRolls.set(id,idRound(item[id]*0.7));
}
}else{//Id = 0
minRolls.set(id,0);
maxRolls.set(id,0);
} }
else {
minRolls.set(id,idRound(item[id]*1.3));
maxRolls.set(id,idRound(item[id]*0.7));
}
}else{//Id = 0
minRolls.set(id,0);
maxRolls.set(id,0);
} }
} }
} }

View file

@ -11,7 +11,7 @@ console.log(url_tag);
* END testing section * END testing section
*/ */
const BUILD_VERSION = "2.8"; const BUILD_VERSION = "2.9";
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+")";