diff --git a/module/applications/dialogs/d20RollDialog.mjs b/module/applications/dialogs/d20RollDialog.mjs index 9075c454..3b3148c7 100644 --- a/module/applications/dialogs/d20RollDialog.mjs +++ b/module/applications/dialogs/d20RollDialog.mjs @@ -149,16 +149,16 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio static toggleReaction() { if (this.config.roll) { this.reactionOverride = !this.reactionOverride; + this.config.roll.type = this.reactionOverride + ? CONFIG.DH.ITEM.actionTypes.reaction.id + : this.config.roll.type === CONFIG.DH.ITEM.actionTypes.reaction.id + ? null + : this.config.roll.type; this.render(); } } static async submitRoll() { - this.config.roll.type = this.reactionOverride - ? CONFIG.DH.ITEM.actionTypes.reaction.id - : this.config.roll.type === CONFIG.DH.ITEM.actionTypes.reaction.id - ? null - : this.config.roll.type; await this.close({ submitted: true }); } diff --git a/module/dice/d20Roll.mjs b/module/dice/d20Roll.mjs index 701616f1..8cec2669 100644 --- a/module/dice/d20Roll.mjs +++ b/module/dice/d20Roll.mjs @@ -145,6 +145,7 @@ export default class D20Roll extends DHRoll { data.difficulty = config.roll.difficulty; data.success = roll.isCritical || roll.total >= config.roll.difficulty; } + data.type = config.roll.type; data.advantage = { type: config.roll.advantage, dice: roll.dAdvantage?.denomination, diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index fcf30be5..bacaf47b 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -69,7 +69,6 @@ export default class DHRoll extends Roll { static postEvaluate(roll, config = {}) { return { - type: config.roll.type, total: roll.total, formula: roll.formula, dice: roll.dice.map(d => ({