diff --git a/modules/pegasus-roll-dialog.js b/modules/pegasus-roll-dialog.js index 7e563b9..41c3088 100644 --- a/modules/pegasus-roll-dialog.js +++ b/modules/pegasus-roll-dialog.js @@ -259,7 +259,14 @@ export class PegasusRollDialog extends Dialog { this.refreshDialog() }) - + html.find('#modifiers').change(async (event) => { + let diceKey = event.currentTarget.value + if ( !diceKey.includes("none")) { + let diceLevel = PegasusUtility.getLevelFromDice(diceKey) + PegasusUtility.addDicePool(this.rollData, diceKey, diceLevel) + this.refreshDialog() + } + }) html.find('.pool-add-dice').click(async (event) => { let diceKey = $(event.currentTarget).data("dice-key") let diceLevel = $(event.currentTarget).data("dice-level") diff --git a/modules/pegasus-utility.js b/modules/pegasus-utility.js index 1183eb6..2200f98 100644 --- a/modules/pegasus-utility.js +++ b/modules/pegasus-utility.js @@ -951,6 +951,7 @@ export class PegasusUtility { specLevelBonus: 0, hindranceLevelBonus: 0, hindranceDicesLevel: 0, + modifiers: "none", otherDicesLevel: 0, statDicesLevel: 0, specDicesLevel: 0, diff --git a/templates/roll-dialog-generic.html b/templates/roll-dialog-generic.html index cf11f9d..af5d7e2 100644 --- a/templates/roll-dialog-generic.html +++ b/templates/roll-dialog-generic.html @@ -105,6 +105,48 @@ {{/if}} +
+ + Modifiers : + +
+