mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
parent
3176438293
commit
ad9e0aa558
9 changed files with 153 additions and 40 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue