• Determines what ability modifier is appropriate for a given score.

    Parameters

    • Optionalscore: number = null

      The score to find the modifier for.

    • Optionaloptions: {
          damage: undefined | number;
          penalty: undefined | number;
      } = {}

      Options for this function.

      • damage: undefined | number

        Ability score damage to take into account.

      • penalty: undefined | number

        A penalty value to take into account.

    Returns number

    The modifier for the given score.

    pf1.utils.getAbilityModifier(15); // => 2
    pf1.utils.getAbilityModifier(6, { damage: 1 }); // => -2