Skip to content

Commit

Permalink
Update MA5e.js
Browse files Browse the repository at this point in the history
if a roll fails during multiattack loop, return
  • Loading branch information
jessev14 committed May 24, 2021
1 parent f482d0e commit 1874837
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/MA5e.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export default class MA5e {
roll = await game.MA5e.og_rollDamage.call(item, { event: { altKey: false }, options: { fastForward: true, chatMessage: false } });
totalDamage += roll.total;
}
if (!roll) return;
roll.options.tooltip = await roll.getTooltip();
if (rollType === "attack") roll.options.highlight = roll.terms[0].total > roll.options.critical - 1 ? "critical" : roll.terms[0].total < roll.options.fumble + 1 ? "fumble" : "";
rollArray[itemIndex].rolls.push(roll);
Expand Down

0 comments on commit 1874837

Please sign in to comment.