Skip to content

AbilityHolder extends Unit

The Unit that holds the Ability.

Used in script callbacks to have access to extra methods and properties.

Properties

Inherited Properties from Unit

Methods

  • play_animation (animation: string)

    Plays an animation on the unit that overrides the unit's current animation. […]

Inherited Methods from Unit
  • find_targets_in_range (find_targets: FindTargets) → { Unit }

    Find targets within a given radius of this unit. […]

  • add_excluded (excluded: Unit)

    Excludes the excluded unit from this unit's UnitInRange and find_targets_in_range results. […]

  • remove_excluded (excluded: Unit)

    Allows the excluded unit to be included in this unit's UnitInRange and find_targets_in_range results again. […]

  • get_stat (stat: Stat, ...: Adjective) → number

    Get the current value of a Stat for this unit, after applying any active buffs. […]

  • buff (buff: StatBuffDefinition)

    Applies a buff to this unit. […]

  • buff_health (buff: HealthBuffDefinition)

    Applies a buff to the health of this unit. […]

  • Removes all buffs from this unit that were granted by the given owner. […]

  • damage (damage: number, adjectives: Adjective | { Adjective }, source: Entity?, cause: Entity?)

    Damages this unit. […]

  • die (source: Entity?, cause: Entity?)

    Instantly kills this unit. […]

  • heal (amount: number, source: Entity?, cause: Entity?)

    Heals this unit. […]

  • get_ability (ability: string) → Ability?

    Gets a unique ability from this unit by an ability ID. […]

  • insert_ability (ability: string, source: Entity?) → Ability

    Adds a unique ability to this unit, by ID. […]

  • add_ability (ability: string, source: Entity?) → Ability

    Unconditionally adds an ability to this unit. […]

  • get_or_insert_ability (ability: string, source: Entity?) → Ability

    Gets a unique ability from this unit by an ability ID, if present. […]

  • stack_ability (ability: string, stack: number, source: Entity?) → Ability

    Convenience method that gets or inserts an ability to this unit, and automatically sets (if newly added) or increments (if already inserted) its [Ability. […]

  • Removes all abilities from this unit that were granted by the given owner. […]

Inherited Methods from Entity

AbilityHolder:play_animation(animation: string)

Plays an animation on the unit that overrides the unit's current animation.

Plays an animation on the unit that overrides the unit's current animation.

Parameters

  • animation Required string

    The name of the animation to play, as defined in the unit's definition.