Skip to content

Ability AI AI

Perryvw edited this page Nov 7, 2015 · 1 revision

Ability AI Functions

These functions can be found on any ability handle the AI receives.

Table of contents

Function List

ability:GetAbilityDamage()

Description

Get the damage an ability does.

Modification

-


ability:GetAbilityDamageType()

Description

Get the type of damage an ability does.

Modification

-


ability:GetAbilityIndex()

Description

Get the index of the ability on the unit.

Modification

Only works in vision


ability:GetAbilityName()

Description

Get the name of the ability.

Modification

-


ability:GetAbilityTargetFlags()

Description

Get the target flags of an ability.

Modification

-


ability:GetAbilityTargetTeam()

Description

Get the target team of an ability.

Modification

-


ability:GetAbilityTargetType()

Description

Get the target type of an ability.

Modification

-


ability:GetAbilityType()

Description

Get the type of the ability.

Modification

-


ability:GetAutoCastState()

Description

Get the auto-cast state (enabled/disabled) of the ability.

Modification

Only works for allied units, false otherwise.


ability:GetBackswingTime()

Description

Get the backswing time of an ability.

Modification

-


ability:GetCastPoint()

Description

Get the cast point of an ability.

Modification

-


ability:GetChannelledManaCostPerSecond(level)

Description

Get manacost per second during channel for some level of the ability.

Modification

-


ability:GetCooldown(level)

Description

Get the cooldown for a certain level of the ability.

Parameters

  • Level - The level to query the cooldown for.

Modification

-


ability:GetCooldownTime()

Description

Get the cooldown time for the current level of the ability.

Modification

Only returns times for abilities of teammates, 0 otherwise.


ability:GetCooldownTimeRemaining()

Description

Get the remaining cooldown time for the ability.

Modification

Only returns times for abilities of teammates, 0 otherwise.


ability:GetCurrentCharges()

Description

Get the current amount of charges on an item.

Modification

Only works if the owner is in vision.


ability:IsItem()

Description

Return if the ability is an item or not.

Modification

-


entity:GetClassname()

Description

Get the classname of the entity.

Modification

-


entity:GetEntityHandle()

Description

Get the entity handle of the entity.

Modification

-


entity:GetEntityIndex()

Description

Get the entity index of the entity.

Modification

-


entity:GetName()

Description

Get the name of the entity.

Modification

-