Data/Abilities/Behavior

## Behavior

### Description

Ability which applies a behaviour to the casting unit. Used to create passive and toggle abilities. If the ability does not have the toggle toggle flag enabled, it will execute itself the instant you learn it (if it is a skill like DotA, or similar hero map). If the toggle flag is enabled, the behaviour will be applied when you turn it on, and removed when you turn it off. Validators can be assigned to the ability that will have to return true before the ability can be executed.
It is considered passive in this thread, if you have not checked the flag **Toggle**.

### Hint

* Great ability to create learnable or levelable auras and other passive abilities.

* Has the advantage of a toggle. This means that the cancel button is already set to show only when the ability is toggled on. This is more convenient than creating an Effect-Instant ability, since you dont need to put an apply behavior effect. However, both would result the same if the player sets the behavior **buff flag** to **channeled**, and the Effect-Instant ability to **Uninterruptible/Cancelable** Channel, else than the fact that you cannot have 2 effect abilities channeling at the same time, while the Behavior ability can (it's not a channel). Another notable advantage is that you can set it to "toggled on" for start. This is useful in certain situation where the ability is best already activated without the necessity of an auto-cast (and yet Behavior Abilities also have auto-cast as well).
* Is however inconvenient in map editing for keeping track of the behavior. Selecting the behavior will work, but it will not show in the effect tree. Also, changing the name of the concerned behavior will unlink this ability to it and it will have to be looked up and linked over again. This not very handy when testing.
* Using a Morph ability will waste the aquired behavior if the Morphed unit doesn't own this ability as well. To solve it, one must put the ability on both Morph/Morphed version units.

## Fields Description

### (None): Auto Cast Toggle Off Validator Array

Validators that allows an auto-cast to toggle off the behavior.

### (None): Auto Cast Toggle On Validator Array

Validators that allows an auto-cast to toggle on the behavior.

### (None) Expire Cost

Cost related to the expired duration of the behavior

* Unsure how it prevents anything

### Ability: Auto Cast Validators

* Validators that need to return true for this ability to auto cast
* If the ability has several levels then the validators for auto casting the ability will update by using the validator one down in the list from the previous one with each increase in level

### Ability: Behavior Cycle Mode

If the ability has multiple behaviours associated with a single level this field determines how the behaviours are cycled through with each cast of the ability

* **Normal:** Cycles through the list from top to bottom before rolling over
* **Random:** Chooses a random behavior from the list
* **Random No Repeat:** Chooses a random behavior from the list that has not yet been used. Once all behaviors have been used once the list refreshes

### Ability: Behaviors

The behavior that will be applied to the caster when the ability is automaticly executed (if passive), or turned on (if toggle is enabled)

* If the ability is levelable each level will apply the behaviour one down in the list from the previous level
* An aura can be created by applying a buff that periodically uses a Search Area effect which applies a status altering buff to friendly or enemy units
* If you want to create a passive that only affects the unit that has this ability, use a buff effect that modifies the unit directly

### Ability: Validators

* Validators that must return true to execute the ability
* If the ability has several levels then the validators for the ability will update by using the validator one down in the list from the previous one with each increase in level
* Only applies to toggling the ability **On**. This means a buff behaviour that is enabled/disabled by validators and counted by a requirement is necessary for validating toggling the ability off.

### Command Card: Learn / Level Button

For all:

* At level 1 of the skill, the learn command card button will have the image assigned by the actual turn on button
* At level 2 of the skill, the image will change to the top value, and at level 3 the second top value, and so on

The following fields have been sorted togheter for a simpler display:

#### Learn Button: [Image / Name / Toolip / Toolip Image]

* Used if the ability is levelable to change the [Image / Name / Toolip / Toolip Image] of the command card button of the Learn ability with every level of the skill.

#### Level Button - Off [Image / Name / Toolip / Tooltip Image]

* Used if the ability is levelable to change the [Image / Name / Toolip] of the turn off command card button with every level of the skill.

#### Level Button - On [Image / Name / Toolip / Tooltip Image]

* Used if the ability is levelable to change the [Image / Name / Toolip] of the turn oncommand card button with every level of the skill.

### Cost: Cost

Cost for using the toggle on.

Cost fields are described on the abilities.

### Cost: Off Cost

Cost for using the toggle off.

Cost fields are described on the abilities.

### Stats: Flags

Flags for the ability.

* **Auto Cast:** The ability is able to have auto cast activated/deactivated by right clicking the command card button
* **Auto Cast On:** Makes the ability default to auto cast on when the unit is created
* **Best Unit:** If multiple units with this ability are selected, only one(seemingly at random?) will activate the ability. Functions the same in reverse if the **Toggle** flag is checked while pressing the cancel button.
* **Toggle:** Check, if you want the ability to be able to be toggled, do not check if you want the ability to stay on once activated.
* **Toggled On:** Makes the ability default to on when the unit is created
* **Transient:** Means it won't interrupt other orders in the queue, when activated.
* **Turn Auto Cast Off When Owner Leaves:** Deactivates the auto cast from all units with auto cast on when the player leaves

## Related

* Behaviors
* Buttons
* Learn