Data/Validators/Unit Alliance

## Unit Alliance

### Description

Determines the type of relation between the **Unit** and the **Player**, in term of control, allegiance, etc.

* This validator is probably useful in cases where the map will generate some changes between the players in term of alliance, shared control, can chat between each others, etc.

Unit Filters might be a more radical way to split players, however this validator offers more relation specific verfications.

* Unlike Unit Filters, this validator can check upon mind control effects by using the Upkeep **Alliance Player**. There is no single **Value** that can ensure the success of this validator (for example, an enemy can give you control of its units, but still remains your enemy), but usually, the default value should passive (even this one is tricky, because Mineral fields consider your team as passive, so they can be targeted). Using more than one of this validator, as multiple alliance values can strengthen the result. On the other hand, a unit which YOU mind control may not return true from this validator if its upkeep is an enemy that shares nothing.

## Field Categories

### (None): Alliance Player

Ressembles to the Train abilities ("Tech Player" field), identifying the proper origin location of the unit.

* Upkeep: Refers to the primary player which this unit provide tech to.
* Control: Refers to the player currently controlling the unit (such as mind control effects, or simply the origin player if the unit isn't controlled by a buff/modify unit owner).

### (None): Find

Determines if the fields stated in this validator are to be considered as true, or the opposite. Inverts the result.

### (None): Value

The actual shared relation features between the unit and the player.

Take note that reciprocity is not necessary (a player can still be allied to a player that still considers him as an enemy). Most of these choices reflects features that are shared between players, usually allies. For example, a player can be an enemy to the player, but still share its Pylon power field (**Power**) to the target player. After testing most of them, it is not easy to affirm from which side it is required to have the feature (for example, tesing the Passive returned false even if the enemy player was only passive to the target player, but making them full allies with everything worked... broken feature maybe?), but some of them returned certain. In most cases, enemy players will return false, and in some, neutral is accepted (such as Passive, since they don't attack the players).

* **Chat:** The unit belong to a player that can chat with the specified player. (unsure between users, yet, a "computer" enemy player cannot chat with the player, so this is considered false, which leads to think only friendly chat is accepted).
* **Control:** The unit belong to a player that shares control with the specified player.
* **Defeat:** The unit belong to a player that shares defeat with the specified player.
* **Give Help:** The unit belong to a player that can respond a call for help from the specified player.
* **Passive:** The unit belong to a player that at which the specified player's units are passive (will not attack it).
* **Power:** The unit belong to a player that can provides power to specified player.
* **Pushable:** The unit belong to a player that allows the specified player's units to pass through its own units (this is an availlable feature between allied players).
* **Seek Help:** The unit belong to a player that can call for help to specified player.
* **Spend:** The unit belong to a player that shares resouces with specified player.
* **Trade:** The unit belong to a player that can send resouces to the specified player.
* **Vision:** The unit belong to a player that shares vision to the specified player.

### (None): With Player

Which location of player is compared to the **unit**.

### Validator: Other Unit

If another unit should be compared to the main unit, both will be compared against each others for the alliance versus the indicated player location.

Unsure how this can be used.