module/actor.js
/**
     * Roll an Ability Check
     * @param {String} abilityId    The ability ID (e.g. "str")
     * @param {Object} options      Options which configure how ability checks are rolled
     */
Roll an Ability Check
@param {String} abilityId    The ability ID
@param {Object} options      Options which configure how ability checks are rolled
Roll an Ability Check @param { String } abilityId The ability ID @param { Object } options Options which configure how ability checks are rolled
rollAbilityCheck(abilityId, options = {}) {
        const label = CONFIG.DCC.abilities[abilityId];
        const abl = this.data.data.abilities[abilityId];
        abl.mod = CONFIG.DCC.abilities.modifiers[abl.value] || 0;
        abl.label = CONFIG.DCC.abilities[abilityId];
        let roll = new Roll("1d20+@abilMod", {abilMod: abl.mod, critical: 20});
        if ((abilityId === 'lck') && (options.event.currentTarget.className !== "ability-modifiers")) {
            roll = new Roll("1d20");
        }
        roll.toMessage({
            speaker: ChatMessage.getSpeaker({actor: this}),
            flavor: game.i18n.localize(abl.label) + " Check"
        });
    }
rollAbilityCheck ( abilityId , options = { } ) { const label = CONFIG . DCC . abilities [ abilityId ] ; const abl = this . data . data . abilities [ abilityId ] ; abl . mod = CONFIG . DCC . abilities . modifiers [ abl . value ] || 0 ; abl . label = CONFIG . DCC . abilities [ abilityId ] ; let roll = new Roll ( "1d20+@abilMod" , { abilMod : abl . mod , critical : 20 } ) ; if ( ( abilityId === 'lck' ) && ( options . event . currentTarget . className !== "ability-modifiers" ) ) { roll = new Roll ( "1d20" ) ; } roll . toMessage ( { speaker : ChatMessage . getSpeaker ( { actor : this } ) , flavor : game . i18n . localize ( abl . label ) + " Check" } ) ; }
Roll an Ability Check
 @param {String} abilityId    The ability ID (e.g.
Roll an Ability Check @param { String } abilityId The ability ID ( e . g .
// Convert the roll to a chat message