Feature/344 bardic rally (#363)

* 2

* Dardic Rally Dice
This commit is contained in:
Dapoulp 2025-07-17 00:45:53 +02:00 committed by GitHub
parent 3176438293
commit ad9e0aa558
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 153 additions and 40 deletions

View file

@ -39,11 +39,13 @@ export default class D20Roll extends DHRoll {
}
get hasAdvantage() {
return this.options.roll.advantage === this.constructor.ADV_MODE.ADVANTAGE;
const adv = this.options.roll.advantage.type ?? this.options.roll.advantage;
return adv === this.constructor.ADV_MODE.ADVANTAGE;
}
get hasDisadvantage() {
return this.options.roll.advantage === this.constructor.ADV_MODE.DISADVANTAGE;
const adv = this.options.roll.advantage.type ?? this.options.roll.advantage;
return adv === this.constructor.ADV_MODE.DISADVANTAGE;
}
static applyKeybindings(config) {
@ -90,8 +92,8 @@ export default class D20Roll extends DHRoll {
configureModifiers() {
this.applyAdvantage();
this.baseTerms = foundry.utils.deepClone(this.terms);
this.baseTerms = foundry.utils.deepClone(this.dice);
this.options.roll.modifiers = this.applyBaseBonus();