This commit is contained in:
Ean Milligan 2025-04-28 03:04:28 -04:00
parent dcd49e20dd
commit 5b0de24466
1 changed files with 1 additions and 0 deletions

View File

@ -156,6 +156,7 @@ export const parseRoll = (fullCmd: string, modifiers: RollModifiers): SolvedRoll
tempCountDetails.push(formattedRoll.countDetails); tempCountDetails.push(formattedRoll.countDetails);
} }
// Identify if we are in a state where the current number is a negative number
if (mathConf[i - 1] === '-' && ((!mathConf[i - 2] && mathConf[i - 2] !== 0) || mathConf[i - 2] === '(')) { if (mathConf[i - 1] === '-' && ((!mathConf[i - 2] && mathConf[i - 2] !== 0) || mathConf[i - 2] === '(')) {
if (typeof mathConf[i] === 'number') { if (typeof mathConf[i] === 'number') {
mathConf[i] = <number> mathConf[i] * -1; mathConf[i] = <number> mathConf[i] * -1;