Data/Abilities/Merge

### Hint

* Can be used to create an amalgamation monster where the final creature requires sacrifices to merge into itself using multiple 2 unit merges.
* Alternatively this can be done using the Morph ability as shown (http://www.sc2mapster.com/forums/development/data/23405-puke-a-lisk/?post=16%7Chere).
* The ability Mergable must be on final merged unit's ability list or the merge will be instant.
* Unable to distinguish between different **Merge** abilities when looking for partners to merge

#### How to have AI merge

As you may want to have your computers merge on their own, there are precise methods to do so. It is possible with triggers to have units searched, selected and issue order to merge (selection). With data it is trickier. Use something like this: Effect-Target ability with auto-cast / leading to an issue order effect, or else, behaviors that periodicaly searches nearby merge units, then a set effect, and then 2 issue order effects on that set (one for the source and a second for the searched target, issuing to cast against one another). What's to keep in mind, is that the main tool is the Issue Order effect, and you have to make sure to put ability command 1, essentially the "Target" version of the merge; Selection command will never work with data methods.

#### Known Bug

This ability can outpass a requirements that would limit an amount of unit count. Take 4 units, divide them in 2 groups: 2 of them are far from each others, the 2 others are next to one each other. Select the 2 far units, and order them to merge, and hurry up to the 2 close by units to order them to merge as well. Both groups will succeed at merging, even if the ability had to disable the late group from merging (equals 0 Queued or Better of the mergeable unit).

## Example Usage

Two High Templar merging to become an Archon.

## Fields Description

### 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: Commands - Default Button

To review cost/ability command section, see abilities. For this ability, we'll cover the most essential unique part of it, which consists of **Selection** and **Target**.

* **Selected Units**: Set the default button for the merge which is started by selecting the pre-merge units and activating the ability. In this case, selection is the key and requires no other operation, the units will know how to find each others on their own and move along.
* **Target**: Set the default button for the merge which is started by selecting a single unit and targeting a second unit and do the same with the second unit straight back to the first unit. In this very case, what matters is that each unit target each other at the exact same game "frame". Unfortunatly, this command is impossible for a player to execute, but it exists for a good reason: As stated in the **How to have AI merge** section above, this command is handy for having AI merge units, especially with data methods. Is it a bug that you can't just target a second unit and have the ability execute from both side? This is not clear up to now.

### Effect: Effect

* Effect that is used upon completion of the merge

### Stats: Flags

* **Best Unit:** When a group of units is ordered to cast this ability, only the "best unit" (usually the closest one) will do so. In that particular case of ability, best unit means 2 units at the time (instead of a usual one).
* **Ignore Unit Cost:** Ignore the cost of the created unit set in the unit's data.

### Stats: Range

* Distance merging units can be away from each other before the merge begins.

### UI: Alert

* The alert from the Alerts data type that will happen when merging is completed

### UI: Orders - Color

* Determines the tint of the order queue texture and model

### UI: Orders - Line Texture

* The vertical banner texture shown when queuing several casts of the ability using the shift button

### UI: Orders - Model

* The model used to highlight the ground of the location where the ability will be cast if several casts of the ability are queued using the shift button

### UI: Target Message

* Message that is displayed in the command card while you are targeting the ability.

### UI: Tooltip Priority

* Priority of this ability's tooltips.
* Not quite sure how it works, or where in game this has affect.

## Related

* Mergeable
* Morph
* Morph Placement
* Effects
* Units