Fix behavior of -cost and +cost to match ingame rolling (#234)

Co-authored-by: hppeng <hppeng>
This commit is contained in:
hppeng-wynn 2022-11-15 13:11:38 -08:00 committed by GitHub
parent f8c266db8d
commit 36d099b225
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -197,7 +197,7 @@ function expandItem(item) {
let val = (item[id] || 0); let val = (item[id] || 0);
if (val > 0) { // positive rolled IDs if (val > 0) { // positive rolled IDs
if (reversedIDs.includes(id)) { if (reversedIDs.includes(id)) {
maxRolls.set(id,idRound(val*0.3)); maxRolls.set(id,idRound(val*0.7));
minRolls.set(id,idRound(val*1.3)); minRolls.set(id,idRound(val*1.3));
} else { } else {
maxRolls.set(id,idRound(val*1.3)); maxRolls.set(id,idRound(val*1.3));
@ -206,7 +206,7 @@ function expandItem(item) {
} 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.3));
} }
else { else {
maxRolls.set(id,idRound(val*0.7)); maxRolls.set(id,idRound(val*0.7));