The client-side Combatant document which extends the common BaseCombatant model.

Mixes

ClientDocumentMixin

See

  • Combat The Combat document which contains Combatant embedded documents
  • CombatantConfig The application which configures a Combatant.

Hierarchy

  • any
    • Combatant

Properties

_videoSrc: string = null

The token video source image (if any)

resource: any = null

The current value of the special tracked resource which pertains to this Combatant

Accessors

  • get combat(): Combat
  • A convenience alias of Combatant#parent which is more semantically intuitive

    Returns Combat

  • get isNPC(): boolean
  • This is treated as a non-player combatant if it has no associated actor and no player users who can control it

    Returns boolean

  • get permission(): any
  • Eschew ClientDocument's redirection to Combat#permission in favor of special ownership determination.

    Returns any

  • get visible(): any
  • Returns any

  • get actor(): Actor
  • A reference to the Actor document which this Combatant represents, if any

    Returns Actor

  • get players(): User[]
  • An array of non-Gamemaster Users who have ownership of this Combatant.

    Returns User[]

  • get isDefeated(): boolean
  • Has this combatant been marked as defeated?

    Returns boolean

Methods

  • Parameters

    • user: any
    • permission: any
    • __namedParameters: {
          exact: boolean;
      } = {}
      • exact: boolean

    Returns boolean

    Inherit Doc

  • Get a Roll object which represents the initiative roll for this Combatant.

    Parameters

    • formula: string

      An explicit Roll formula to use for the combatant.

    Returns Roll

    The unevaluated Roll instance to use for the combatant.

  • Roll initiative for this particular combatant.

    Parameters

    • Optional formula: string

      A dice formula which overrides the default for this Combatant.

    Returns Promise<Combatant>

    The updated Combatant.

  • Returns void

  • Update the value of the tracked resource for this Combatant.

    Returns any

  • Protected

    Acquire the default dice formula which should be used to roll initiative for this combatant. Modules or systems could choose to override or extend this to accommodate special situations.

    Returns string

    The initiative formula to use for this combatant.

  • Parameters

    • documents: any
    • operation: any
    • _user: any

    Returns Promise<void>

  • Parameters

    • _documents: any
    • operation: any
    • _user: any

    Returns Promise<void>

  • Parameters

    • _documents: any
    • operation: any
    • _user: any

    Returns Promise<void>