diff --git a/src/solver/parser.ts b/src/solver/parser.ts index be6f4e7..fbf85fb 100644 --- a/src/solver/parser.ts +++ b/src/solver/parser.ts @@ -156,6 +156,7 @@ export const parseRoll = (fullCmd: string, modifiers: RollModifiers): SolvedRoll 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 (typeof mathConf[i] === 'number') { mathConf[i] = mathConf[i] * -1;