Pathfinder 1e for Foundry VTT
    Preparing search index...

    Function getAbilityModifier

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

      Parameters

      • Optionalscore: number

        The score to find the modifier for.

      • Optionaloptions: { damage?: number; penalty?: number } = {}

        Options for this function.

        • Optionaldamage?: number

          Ability score damage to take into account.

        • Optionalpenalty?: 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