Patch for zero value ids
idRound does not round to zero in some cases
This commit is contained in:
parent
de4888fa66
commit
ac87cf5112
1 changed files with 6 additions and 1 deletions
|
@ -52,7 +52,7 @@ function expandItem(item, powders) {
|
||||||
maxRolls.set(id,idRound(val*1.3));
|
maxRolls.set(id,idRound(val*1.3));
|
||||||
minRolls.set(id,idRound(val*0.3));
|
minRolls.set(id,idRound(val*0.3));
|
||||||
}
|
}
|
||||||
} else if (val <= 0) { //negative rolled IDs
|
} else if (val < 0) { //negative rolled IDs
|
||||||
if (reversedIDs.includes(id)) {
|
if (reversedIDs.includes(id)) {
|
||||||
maxRolls.set(id,idRound(val*1.3));
|
maxRolls.set(id,idRound(val*1.3));
|
||||||
minRolls.set(id,idRound(val*0.7));
|
minRolls.set(id,idRound(val*0.7));
|
||||||
|
@ -62,6 +62,11 @@ function expandItem(item, powders) {
|
||||||
minRolls.set(id,idRound(val*1.3));
|
minRolls.set(id,idRound(val*1.3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else { // if val == 0
|
||||||
|
// NOTE: DO NOT remove this case! idRound behavior does not round to 0!
|
||||||
|
maxRolls.set(id,0);
|
||||||
|
minRolls.set(id,0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const id of nonRolledIDs) {
|
for (const id of nonRolledIDs) {
|
||||||
|
|
Loading…
Reference in a new issue