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

    Parameters

    • Optional score: number = null

      The score to find the modifier for.

    • Optional options: {
          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.

    Example

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

Generated using TypeDoc