Combatant extension.

Hierarchy

  • Combatant
    • CombatantPF

Constructors

  • Parameters

    • data: undefined | CombatantDataConstructorData

      Initial data provided to construct the Combatant document

    • context: undefined | Context<Combat>

      The document context, see foundry.abstract.Document

    Returns CombatantPF

Methods

  • Override the default Initiative formula to customize special behaviors of the game system.

    Apply tiebreaker if desired

    See Combat._getInitiativeFormula for more detail.

    Parameters

    • Optionald20: string

      Default check roll

    Returns string

    Initiative formula

    Synchronized with Foundry 12.331

    Build proper formula

  • Duplicate combatant with added data.

    Parameters

    • data: object = {}

      Override data

    • context: object = {}

      Creation context

    Returns Promise<Combatant>

    • Created combatant
  • Get unevaluated initiative roll instance.

    Parameters

    • Optionalformula: string

      Initiative formula override

    • Optionald20: string = null

      D20 override. Non-standard option.

    • Optionalbonus: number = null

      Bonus to initiative. Non-standard option.

    Returns D20RollPF

    Initiative roll instance

    Synchronized with Foundry VTT 12.331

  • Combat tracker resource update.

    Required to deal with 0 values disappearing with core implementation

    Returns any

    Resource value.

    Synchronized with Foundry 12.331