mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-05 20:34:15 +02:00
Fix detection of negative modifiers (#1847)
This commit is contained in:
parent
404640a0a3
commit
b22ce9697d
1 changed files with 1 additions and 1 deletions
|
|
@ -257,7 +257,7 @@ export default class DHRoll extends Roll {
|
||||||
if (!roll.terms[i].isDeterministic) continue;
|
if (!roll.terms[i].isDeterministic) continue;
|
||||||
const termTotal = roll.terms[i].total;
|
const termTotal = roll.terms[i].total;
|
||||||
if (typeof termTotal === 'number') {
|
if (typeof termTotal === 'number') {
|
||||||
const multiplier = roll.terms[i - 1]?.operator === ' - ' ? -1 : 1;
|
const multiplier = roll.terms[i - 1]?.operator === '-' ? -1 : 1;
|
||||||
modifierTotal += multiplier * termTotal;
|
modifierTotal += multiplier * termTotal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue