Fix D20 roll adv/disadv removing (#280)

This commit is contained in:
Dapoulp 2025-07-06 13:38:10 +02:00 committed by GitHub
parent 51b7cdeefb
commit 8a7ff2306a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -118,7 +118,7 @@ export default class D20Roll extends DHRoll {
applyAdvantage() {
this.d20.modifiers.findSplice(m => ['kh', 'kl'].includes(m));
if (!this.hasAdvantage && !this.hasDisadvantage) this.number = 1;
if (!this.hasAdvantage && !this.hasDisadvantage) this.d20.number = 1;
else {
this.d20.number = 2;
this.d20.modifiers.push(this.hasAdvantage ? 'kh' : 'kl');