Closed algnc closed 3 years ago
I'd like to add some messaging to let the user know that we adjusted the result. I can see us getting queries if the roll outcome doesn't match the dice and formula with no explanation.
Gotcha. Then perhaps a check in the rollWeaponAttack
method or the _formatDamageRoll
would be better?
Something like this maybe?
if (rollResult.rolled) {
const rollData = escape(JSON.stringify(rollResult.roll))
if (rollResult.damage <= 0) {
return `<a class="inline-roll inline-result damage-applyable" data-roll="${rollData}" data-damage="1" title="${rollResult.formula}"><i class="fas fa-dice-d20"></i> 1 (min dmg)</a>`
} else {
return `<a class="inline-roll inline-result damage-applyable" data-roll="${rollData}" data-damage="${rollResult.damage}" title="${rollResult.formula}"><i class="fas fa-dice-d20"></i> ${rollResult.damage}</a>`
}
} else {
return game.i18n.format('DCC.DamageRollInvalidFormulaInline', { formula: rollResult.formula })
}
}
Several times yesterday I had level 0s roll 0 damage because of their -2 STR mod.