module/actor.js
/**
     * Format a roll for display in-line
     * @param {Object<Roll>} roll   The roll to format
     * @param {string} formula      Formula to show when hovering
     * @return {string}             Formatted HTML containing roll
     */
Format a roll for display in-line
@param {Object} roll   The roll to format
@param {string} formula      Formula to show when hovering
@return {string}             Formatted HTML containing roll
Format a roll for display in - line @param { Object } roll The roll to format @param { string } formula Formula to show when hovering @return { string } Formatted HTML containing roll
_formatRoll(roll, formula) {
        const rollData = escape(JSON.stringify(roll));
        let critFailClass = "";
        if (Number(roll.dice[0].results[0]) === 20) critFailClass = "critical ";
        else if (Number(roll.dice[0].results[0]) === 1) critFailClass = "fumble ";
        return `<a class="${critFailClass}inline-roll inline-result" data-roll="${rollData}" title="${formula}"><i class="fas fa-dice-d20"></i> ${roll.total}</a>`;
    }
_formatRoll ( roll , formula ) { const rollData = escape ( JSON . stringify ( roll ) ) ; let critFailClass = "" ; if ( Number ( roll . dice [ 0 ] . results [ 0 ] ) === 20 ) critFailClass = "critical " ; else if ( Number ( roll . dice [ 0 ] . results [ 0 ] ) === 1 ) critFailClass = "fumble " ; return ` ${ critFailClass } ${ rollData } ${ formula } ${ roll . total } ` ; }
Format a roll for display in-line
 @param {Object<Roll>} roll   The roll to format
 @param {string} formula      Formula to show when hovering
 @return {string}             Formatted HTML containing roll
Format a roll for display in - line @param { Object<Roll > } roll The roll to format @param { string } formula Formula to show when hovering @return { string } Formatted HTML containing roll
// Check for Crit/Fumble