Hierarchy

  • Combat
    • CombatPF

Constructors

  • Parameters

    • Optional data: any

      Initial data provided to construct the Combat document

    • Optional context: any

    Returns CombatPF

Accessors

Methods

  • Internal

    Determine skipped turns

    Parameters

    • from: {
          round: number;
          turn: number;
      } = {}
      • round: number

        From round

      • turn: number

        From turn

    • context: object

      Update context

    Returns Set<Combatant>

    • Set of combatant IDs whose turn was skipped
  • Internal

    Handle effects of skipped turns.

    Parameters

    • skipped: Set<Combatant>

      Combatant IDs of those whose turn was skipped.

    • context: object

      Combat update context

    Returns void

  • Private

    New turn handling.

    Parameters

    • changed: any
    • context: any
    • userId: any

    Returns Promise<void>

  • Parameters

    • changed: any
    • context: any
    • userId: string

      Triggering user ID

    Returns void

  • Internal

    Parameters

    • changed: object
    • context: object
    • user: User

    Returns Promise<void>

  • Internal

    Handle end of turn

    Parameters

    • originTime: {
          turn: number;
      } = {}
      • turn: number

        Turn that ended

    • context: object = {}

    Returns Promise<void>

  • Internal

    Process end of durations based on initiative.

    Only active GM processes these to avoid conflicts and logic bloat.

    Returns void

  • Process current combatant: expire active effects & buffs.

    Parameters

    • changed: object

      Update data

    • context: options

      Context options

    • userId: string

      Triggering user ID

    Returns Promise<void>

  • Parameters

    • ids: string[]

      Combatant IDs to roll initiative for.

    • Optional options: {
          bonus: undefined | string;
          rollMode: undefined | string;
          skipDialog: undefined | boolean;
      } = {}

      Additional options

      • bonus: undefined | string

        Formula for bonus to initiative

      • rollMode: undefined | string

        Roll mode override

      • skipDialog: undefined | boolean

        Skip roll dialog

    Returns Promise<CombatPF | {
        combat: CombatPF;
        messages: any;
    }>

  • Parameters

    • options: {
          bonus: string;
          d20: string;
          name: string;
      } = {}
      • bonus: string

        Bonus formula override

      • d20: string

        Formula override

      • name: string

        Name of the roller

    Returns object

Generated using TypeDoc