Options
All
  • Public
  • Public/Protected
  • All
Menu

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

mixes

ClientDocumentMixin

see

Combat The Combat document which contains Combatant embedded documents

see

CombatantConfig The application which configures a Combatant.

Hierarchy

  • any
    • Combatant

Index

Constructors

  • Returns Combatant

Properties

_videoSrc: string = null

The token video source image (if any)

internal
resource: any = null

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

Accessors

  • 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 isOwner(): any
  • override

    Returns any

  • get visible(): any
  • override

    Returns any

  • A reference to the Actor document which this Combatant represents, if any

    Returns Actor

  • A reference to the Token document which this Combatant represents, if any

    Returns TokenDocument

  • get players(): User[]
  • An array of User documents who have ownership of this Document

    Returns User[]

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

    Returns boolean

Methods

  • testUserPermission(user: any, permission: any, __namedParameters?: { exact: boolean }): any
  • inheritdoc

    Parameters

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

    Returns any

  • getInitiativeRoll(formula: string): Roll
  • 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.

  • rollInitiative(formula: string): Promise<Combatant>
  • Roll initiative for this particular combatant.

    Parameters

    • formula: string

    Returns Promise<Combatant>

    The updated Combatant.

  • prepareDerivedData(): void
  • override

    Returns void

  • updateResource(): any
  • Update the value of the tracked resource for this Combatant.

    Returns any

  • _getInitiativeFormula(): string
  • 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.