Moved the setting of data.type to d20Roll to not interfer with damageRoll

This commit is contained in:
WBHarry 2025-07-31 21:03:56 +02:00
parent 3e333d3533
commit 8c5a3dbbc5
3 changed files with 6 additions and 6 deletions

View file

@ -149,16 +149,16 @@ export default class D20RollDialog extends HandlebarsApplicationMixin(Applicatio
static toggleReaction() {
if (this.config.roll) {
this.reactionOverride = !this.reactionOverride;
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;
this.render();
}
}
static async submitRoll() {
await this.close({ submitted: true });
}

View file

@ -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,

View file

@ -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 => ({