Added Minimum Damage of 1

Per Issue #13.
master
The Happy Anarchist 2020-09-24 16:59:43 -10:00
parent 455a64c0a1
commit 8b9d0f1c88
1 changed files with 5 additions and 0 deletions

View File

@ -202,6 +202,11 @@ export class AcksDice {
const roll = new Roll(parts.join("+"), data).roll();
const dmgRoll = new Roll(data.roll.dmg.join("+"), data).roll();
// Add minimal damage of 1
if (dmgRoll.total < 1) {
dmgRoll._total = 1;
}
// Convert the roll to a chat message and return the roll
let rollMode = game.settings.get("core", "rollMode");
rollMode = form ? form.rollMode.value : rollMode;