mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
enhance advantage logic
This commit is contained in:
parent
1d6b66d590
commit
e06aac3315
1 changed files with 2 additions and 8 deletions
|
|
@ -107,14 +107,8 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
|
|
||||||
static updateIsAdvantage(_, button) {
|
static updateIsAdvantage(_, button) {
|
||||||
const advantage = Number(button.dataset.advantage);
|
const advantage = Number(button.dataset.advantage);
|
||||||
if (advantage === 1) {
|
this.advantage = advantage === 1;
|
||||||
this.advantage = true;
|
this.disadvantage = advantage === -1;
|
||||||
this.disadvantage = false;
|
|
||||||
}
|
|
||||||
if (advantage === -1) {
|
|
||||||
this.advantage = false;
|
|
||||||
this.disadvantage = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.config.roll.advantage = this.config.roll.advantage === advantage ? 0 : advantage;
|
this.config.roll.advantage = this.config.roll.advantage === advantage ? 0 : advantage;
|
||||||
this.render();
|
this.render();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue