diff --git a/module/applications/sheets-configs/action-config.mjs b/module/applications/sheets-configs/action-config.mjs index 6a3f4b8a..f6b9932f 100644 --- a/module/applications/sheets-configs/action-config.mjs +++ b/module/applications/sheets-configs/action-config.mjs @@ -195,7 +195,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) { if (!this.action.damage.parts) return; const data = this.action.toObject(), part = {}; - if(this.action.actor.isNPC) part.value = { multiplier: 'flat' }; + if(this.action.actor?.isNPC) part.value = { multiplier: 'flat' }; data.damage.parts.push(part); this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) }); } diff --git a/module/dice/damageRoll.mjs b/module/dice/damageRoll.mjs index 34fe77d7..4f5d9172 100644 --- a/module/dice/damageRoll.mjs +++ b/module/dice/damageRoll.mjs @@ -12,6 +12,7 @@ export default class DamageRoll extends DHRoll { static async buildEvaluate(roll, config = {}, message = {}) { if (config.evaluate !== false) { + if(config.dialog.configure === false) roll.constructFormula(config); for (const roll of config.roll) await roll.roll.evaluate(); } roll._evaluated = true; diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index c50c126a..e61d82a0 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -56,13 +56,13 @@ export default class DHRoll extends Roll { } // Create Chat Message + if (roll instanceof CONFIG.Dice.daggerheart.DamageRoll && Object.values(config.roll)?.length) { + const pool = foundry.dice.terms.PoolTerm.fromRolls( + Object.values(config.roll).flatMap(r => r.parts.map(p => p.roll)) + ); + roll = Roll.fromTerms([pool]); + } if (config.source?.message) { - if (Object.values(config.roll)?.length) { - const pool = foundry.dice.terms.PoolTerm.fromRolls( - Object.values(config.roll).flatMap(r => r.parts.map(p => p.roll)) - ); - roll = Roll.fromTerms([pool]); - } if (game.modules.get('dice-so-nice')?.active) await game.dice3d.showForRoll(roll, game.user, true); } else config.message = await this.toMessage(roll, config); }