Data/Abilities/Effect - Target

## Effect - Target

### Description

Ability which when left clicked enables casting of an effect at the location of the mouse cursor with a second left click if there is a valid target.

### Hint

This ability type is very similar to the Effect - Instant ability. The difference is that here you get to choose your target or point where this ability will take place. This can be used to create the **Calldown MULE** ability, throw a rock, or shoot missile at a specific place. A lot abilities use this type of ability.

## Example Usage

### High Templar - Psi Storm

Ability of the High Templar that applies a Create Persistent effect to the target point which uses a periodic Search Area effect to apply a Buff behaviour to enemy units within the area of effect that uses Damage effects to deal periodic damage.

Take not that it is simpler to use a **Cancel Cost field** in with negative numbers to get an ability refunded upon canceling. The refund **fraction fields** doesn't seem to be functional.

## Fields Description

### (None): Cancel Delay

* The delay before cancellation takes effect for the approach, bail, cast, channel, finish, prepare or wait phase of the ability

### (None): Cancel Effect

* The effect used when cancelling during the approach, bail, cast, channel, finish, prepare or wait phase of the ability

### (None): Extra Vital Cost

Seems to be an extra field to add "overall cost", assuming it adds on each level individual.

### (None): Interrupt Cost

Cost when the ability is interrupted.

To know more about the cost fields, see abilities.

### (None): Interrupt Cost - Interruptible Cost Stages

* Determines if the interrupt costs are applied during the during the approach, bail, cast, channel, finish, prepare or wait phase of the ability

### (None): Marker - Duration

* Determines how long markers generated by this ability last
* Markers can only be created by certain effect tree combinations ending in a Damage effect, reducing their utility

### (None): Post / Pre Effect Behavior

#### Post Effect Behavior

Behavior that is added on the caster of the ability, AFTER the initial effect has launched.

* Is not shown in the effect tree of the editor.

#### Pre Effect Behavior

Behavior that is added on the caster of the ability, BEFORE the initial effect has launched.

* Is not shown in the effect tree of the editor.

#### Common field to both

**Behavior**

* The behavior from the Behaviors data type that is applied.

**Count**

* The number of behavior stacks to apply. Requires more than 0 to be functional.

**Duration**

* How long the applied behavior lasts
* If not the default value, overrides the removal by the **Stats: Backswing** ending

**Flags**

* Use Duration: Enables the application of a manual duration
* Set Attribute Points: (New feature, to be filled)
* Set Attribute Base Points: (New feature, to be filled)
* Set Attribute Points Delta: (New feature, to be filled)

### Ability: Acquire Attackers

* Used by healing abilities
* Makes the ability prioritize units that are being attacked if the **Ability: Auto Cast Acquire Level** is set to **Defensive**.
* Makes the ability prioritize units that are attacking the caster if the **Ability: Auto Cast Acquire Level** is set to **Offensive**.

### Ability: Acquire Priority

* When more than one of a unit's abilities try to auto-acquire targets, the ability that returns a highest "acquire priority" will be given the first chance to excamine potential targets. Abilities that don't acquire targets should set this to 0. Abilities that are set to 0 won't be given a chance to acquire targets.

### Ability: Alignment

* Determines whether the ability is considered neutral, negative or positive.
* If the ability shows anywhere (usually does not, since it will be buffs or buttons you will see in game, so I guess it does not matter much, but anyway), it will be coloured by the alignment. Neutral is nothing, positive is green, negative is red.
* This also applies for buttons and buffs.

### Ability: Arc Slop

* If the target is moving, this determines how far the target is allowed to move from the initial arc before the ability is cancelled.

### Ability: Arc

* Controls the arc around the caster that the target of the ability must be in
* 360 is all around
* 90 is a cone in front with 45 degrees to either side the unit is facing
* If the target is outside this arc when the ability is cast, the caster will turn until the target is inside the arc
* Known to occasionally be ignored by auto cast abilities which will still cast with an arc of 360

### Ability: Auto Cast Acquire Level

* Determines how the autocast prioritizes acquired targets
* **Defensive** targets friendly units that are being attacked
* **Offensive** means the unit autocasts the ability in preference on enemies
* **Passive** & **None** disables the use of auto cast, even if the flag is enabled.

### Ability: Auto Cast Filters

* Filters for determining what unit attributes the auto cast can target

### Ability: Auto Cast Range

* Range at which auto cast can be triggered

### Ability: Auto Cast Validators

* Validators that must return true for the auto cast to be used on the target

### Ability: Cancelable

Determines the stages the ability that are cancelable

* **Approach:** allows the ability to be cancelled when the unit is moving so that the target is within range
* **Bail:** (Unknown)
* **Cast:** allows the moment when the effect is cast to be cancelled
* **Channel:** allows the phase where a persistent effect is being channelled to be cancelled
* **Finish:** allows the ability to be cancelled once it has finished channelling
* **Prepare:** allows the phase just before casting to be cancelled
* **Wait:** (Unknown)

### Ability: Commands - Default Button

Default command for the ability. See abilities for defailed info.

### Ability: Finish Command

* Orders another a command button of an ability from the Abilities data type to be executed when this ability finishes
* Abilities with no cooldown can be chained to keep using the ability on the same target until cancelled, the target dies or the caster cannot pay the costs

### Ability: Pausable Stages

* Stages during which the ability can be paused
* (Unknown) How?

### Ability: Place Unit

* Ghost placement footprint of the ability
* Uses the **Movement: Pathing Footprint - Placement** footprint of the selected unit from the Units data type

### Ability: Placeholder Unit

* Ghost placement image for the ability.
* Only seems to work if the effect if the Effect Field can target a point.
* The unit is visible through fog of war.

### Ability: Preemptable Stages

* Stages of the ability that can be pre-empted
* (Unknown) How?

### Ability: Produced Unit

* (Unknown) Will produce this unit when executed, if there is any placed? Summoning abilities made with this type of ability usually use a create unit effect. Maybe it is might easier just to put the units in here.
* If several units are placed in here, and the ability is upgradable, then it will automatically chose the unit one down the list with every upgrade.

### Ability: Progress Buttons

* The Buttons that are shown in the command card at different stages of casting the ability
* If you don't want the button to change, do not add anything to this field
* Each entry is in order of occurrence.

### Ability: Refundable Stages

* Stages of the ability at which cancellation will give a refund of the costs

### Ability: Set Last Target

* Using the ability will go back to the last targeted unit after use
* **Attack:** The unit will continue to attack the last selected target after using the ability
* **Automatic:** (Unknown)
* **Move:** The unit will continue to move to the last designated location after using the ability
* **Unknown:** The unit will forget previous targets

### Ability: Smart Priority

* If multiple abilities on the unit have the **Smart Command** flag enabled, this field determines the priority for using this ability over the others

### Ability: Smart Validators

* Validators for using **Smart Command** (right mouse button linked ability use) if the flag is enabled under **Stats: Flags**
* If the skill is upgradable and more than one Validator has been placed in here, it will automatically jump one **Validator** down the list with every upgrade.

### Ability: Target Filters

* Filters that determine which unit attributes the ability can target.
* If the skill is upgradable and more than one **Target Filter** has been placed in here, it will automatically jump one **Target Filter** down the list with every upgrade.

### **Ability: Target Sorts -**

#### Request Count

Required amount of targets for target sorting.

#### Request Percentage

Required percentage of targets in the lot from target sorting.

#### Sorts

* The target sort from the Target Sorts data type used to choose the auto cast target if there are multiple options

### Ability: Uninterruptible

* Stages at which the ability is unable to be stopped by external influences eg. abilities which stun/disable abilities

### Ability: Validate

* Stages of the ability to which Validators apply
* Stages of the ability to which Requirements apply (ex: the Finish effect is usually set to disabled by default, and will not get interrupted if a requirement fails to pass in the process)

### **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: [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.

### Cost: Cancel Cost

Cost when canceling the ability. Fields can be set in negative to create a "refund".

See abilities for detailed information about cost.

### Effect: AI Notify Effect

* Child effect of the ability that will give the AI an indication on how to behave. See effects for detailed information.

### Effect: Calldown Effect

* Links the number of charges shown to a Use Calldown effect

### Effect: Cursor Effect

* If you want to display an area of effect when you hover with the cursor a Search Area effect must be added to create a Splat actor that is linked to this.

### Effect: Cursor Range Mode

Affects how far from the target point the cursor appears

* **Clamp:** Cursor follows the mouse until the **Stats: Range** before following the circumference
* **Force To Max:** Forces the cursor to the circumference of the **Stats: Range**
* **Normal:** Cursor follows the mouse

### Effect: Effect

* The effect from the Effects data type used when the ability is cast
* If your ability is upgradeable/levelable, and you want the effect to change, you add several indexes in this field
* The first level of the skill will use the top value, and the second level of the ability, will use the second value and so on

### Effect: Effect Range

* The maximum acquisition range from which the effect can be cast from the caster
* If set higher than **Stats: Range**, the unit will move into range before casting
* Default set to the minimum value of 0
* Maximum 500

### **Effect: Marker**

#### Count

* How many markers are added by the ability

#### Link

* String that allows several abilities/effects to share the same markers

#### Match Flags

* Flags used for recognition of markers
* **Casting Player:** requires the marker to have been made by the player for it to be able to be recognised
* **Casting Unit:** requires the marker to have been created by the same unit for it to be able to be recognised
* **Id:** markers with the same ID are able to be recognised
* **Link:** markers with the same **Effect: Marker - Link** string are able to be recognised

#### Mismatch Flags

* Flags that prevent marker recognition
* **Casting Player:** requires the marker to have been made by another player for it to be able to be recognised
* **Casting Unit:** requires the marker to have been created by a different unit for it to be able to be recognised
* **Id:** markers with different IDs are able to be recognised
* **Link:** markers with a different **Effect: Marker - Link** string is able to be recognised

### Effect: Markers Used

* Phases of casting the ability that use markers
* Some heal abilities uses it to disable approach or some early phases in which multiple caster unit can attempt to heal the target, but will stop when one of them is channeling.

### Stats: Cast Finish Time Effect

The effect Effects that will be used to indicate progress bar amount of time instead of using a flat timer on Cast Finish Time. The ability must be channeled. We usually set Create Persistent on this field and this also takes further channeled effect or channeled buff behavior into consideration. While untested, probably that any other child effects such as Apply Behavior could be used to relate directly to the buff behavior's duration as a progress bar.

### Stats: Cast Finish Time

* Minimum time the unit must be in the **Channeling** Phase before the ability enters the **Finish** phase.
* Can be used to set up the progress bar.
* If the ability is upgradeable/levelable, and you want the time to increase with every level, add several values. Level 1 will use the top value, and with every level/upgrade, the ability will use the value below.

### Stats: Cast Start Time

* Duration of the Casting phase time
* How long is taken before the **Effect: Effect** is used
* If the ability is upgradeable/levelable, and you want the duration to increase with every level, add several values. Level 1 will use the top value, and with every level/upgrade, the ability will use the value below.

### Stats: Finish Time

* Duration of the Finish phase, which occurs after the **Effect: Effect** has been cast.
* If the ability is upgradeable/levelable, and you want the duration to increase with every level, add several values. Level 1 will use the top value, and with every level/upgrade, the ability will use the value below.

### Stats: Flags

Flags for the ability

* **Abort On Alliance Change:** cancels the ability if it is trying to target an enemy and the player is allied in the process. This also include an alliance change while channeling, which will break the channel.
* **Allow Movement:** allows the casting unit to turn while preparing to cast
* **Allow Moving Supressed:** prevents the caster from moving towards the target when preparing to cast if the target moves out of range
* **Allow Turning Supressed:** prevents the caster from turning towards the target when preparing to cast if the target moves out of range
* **Auto Cast:** allows the ability to be auto cast
* **Auto Cast Initially On:** makes the ability default to auto cast being 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
* **Cancel Reset Auto Cast:** Determines whether the auto-cast state of the ability would be reset when the player manually cancels ability channeling.
* **Channelling Minimum:** (Unknown)
* **Chase:** caster will be moving towards target while channeling.
* **Clear Last Attack Target:** Overrides the **Ability: Set Last Target** field to forget the last attack target after using the ability
* **Clear Last Move Target:** Overrides the **Ability: Set Last Target** field to forget the last move target after using the ability
* **Defer Cooldown:** Forces the **Cost: Cooldown time use** to wait before starting its timer only after the channels has ended. Otherwise, the cooldown will start right away when the ability is used. Channel may include finish time.
* **External Acquire Passenger:** Allows abilities to acquire units inside a transport.
* **Homogenous Interrupt:** When this flag is on, users will see the following behavior: If a player selects a unit that is channeling a spell and orders it to move, it will stop the channel and move. If the player selects more than one unit and at least one of them is not channeling a spell, only the units that are not channeling will move immediately. In this scenario, the move order would be queued for all units currently channeling spells. When the flag is off, players will observe the old SC2 behavior.
* **Ignore Order Player Id In Stage Validate:** (Unknown)
* **Line Movement:** (Unknown)
* **No Deceleration:** Prevents the caster from decelerating when it is near the range needed to cast
* **Passenger Acquired External:** Allows autocasted abilities to target units outside of the transport when the caster is in a transport.
* **Passenger Acquired Passenger:** Allows autocasted abilities to target units inside of the transport when the caster is in a transport. Only used by healers
* **Passenger Acquired Transport:** Allows autocasted abilities to target the transport when the caster is in a transport.
* **Range Use Caster Radius:** Adds the **Movement: Radius** of the caster unit to the **Stats: Range** of the ability
* **Range Use Pathing:** (Unknown)
* **Re-executable:** allows the ability to be automatically cast again on the same target as soon as possible unless ordered otherwise. Used by healers.
* **Reapproachable:** If channeling the ability and the target should move out of range , allows the caster to reapproch the target again. Seems to only work with Re-excutable.
* **Require Target Vision:** means the ability cannot be cast unless the target unit/point is visible
* **Smart Command:** allows the skill the be bound to and cast by right mouse click. Seems to ignore "Best Unit" flag. If this is problematic, one can put on the first effect the validator "No Marker" and set a cast time to allow all casters to compare. Take note that it won't work on Smart Validators field. Also, smart command doesn't work if the command using the ability is set on **Ignore User** flag.
* **Transient:** Allows the ability to be used while the unit is moving. Not available for auto-casting (assuming that the caster is moving). Only Effect-Instant may have it for auto-cast. This also causes to ignore auto-cast range, but only use the ability's range instead. Also prevents "Channels", even if the caster is not taking any action.
* **Transient Preferred:** Works like Transient, but if the ability cannot be cast while "transient" (Ex: target unit/point is out of range of the ability) then it will override the order as if the spell wasn't transient. If you get a "Target out of range" error while the Transient flag is enabled, try disabling it and enabling Transient Preferred instead.
* **Transport Acquired Passengers:** Allows autocasted abilities to target unit inside the transport when the caster is the transport.
* **Turn Auto Cast Off When Owner Leaves:** turns off the auto cast of the ability if the owning player leaves the game
* **Uninterruptible Turn:** Turning to approach or preparing to cast is unable to be interrupted
* **Update Charges On level Change:** When the ability levels up charges are reset to the start values
* **Update Target:** (Unknown)
* **Wait To Spend:** Only uses the cost resources/vitals after casting the effect

### Stats: Prepare Time

* Duration of the Prepare phase.
* If the ability is upgradeable/levelable, and you want the duration to change with every level, add several values. Level 1 will use the top value, and with every level/upgrade, the ability will use the value below.

### Stats: Range Extra

* How far the target must move before casting the ability is cancelled

### Stats: Range

* The actual range of the ability.
* If the ability is upgradeable/levelable, and you want the range to change with every level, add several values. Level 1 will use the top value, and with every level/upgrade, the ability will use the value below

### UI: Activity

Word that appears above the progress bar when channeling. Ex: Morph abilities show the word "Transforming". Train abilities show the word "Training".

### UI: Alert Array

* If you want different alerts from the Alerts data type to appear at different stages of the ability.

### UI: Default Error

* The default error that will appear if there is not a valid target at the location where the ability is clicked to be cast

### UI: Error Alert

* The alert that will happen if the ability cannot be cast.

### UI: Show Progress

* If you want to show a progress bar linked to the different stages of the ability.
* Each entry is in order of occurrence.
* Use the **Finish cast time effect** field to imput a Create Persistent effect in it, which is a child effect of the ability, which will be used to indicated the real progress time for the channel phase. Make sure that the effect has the flag "Channeled". Also, if it desired that the channel may not be interrupted, but show its progress, use the **Uninterruptable** field to allow it.

## Related

### Data Types

* Alerts
* Buttons
* Effects

### Abilities

* Augment
* Redirect - Target