XCOM 2/Viper

"No reason for them to hide. The aliens don't need an infiltration unit any more" ~Central Officer Bradford, two weeks after seeing a faceless



The Viper is an alien unit with a large number of offensive and debilitating abilities. Most notably, it has the ability to pull XCOM operatives towards its square from a long distance away. This action has a large chance to reveal new pods before you are through fighting the pod that contained the viper.

Stats
Assume unlisted values are 0 or N/A. Unless otherwise specified, all damage ranges are uniformly distributed - each outcome is equally likely.

Types: Poison Immune

'''12 mobility is the same mobility as an XCOM soldier. 14 mobility allows you to move 9 tiles in a straight line. 15 mobility allows you to move 10 tiles in a straight line. Bind has a 75% chance to deal 2 damage and a 25% chance to deal 3 damage. Bind cannot crit.'''

Abilities
Poison Spit: spits a cloud of poison radius 2. The cloud lingers for three turns. Anyone who is within the cloud's initial impact or who enters the cloud becomes poisoned. 4 turn cooldown. Costs 1 action and does not end turn.

Tongue Pull: The viper makes an attack at +20 aim against a unit. If the attack hits, that unit is moved to a tile cardinally adjacent to the viper, and the viper immediately uses Bind and Crush on the target. 1 turn cooldown. Costs 1 action and does not end turn.

Bind and Crush: The viper targets a cardinally adjacent (not adjacent by diagonal) enemy and wraps itself around them. May only be used on humanoid enemies. It does 2-3 damage initially and at the start of each of the viper's turns as long as it maintains the bind. During the bind, the viper and the target still occupy the squares they initially occupied before the bind. Damaging the viper will release the unit from the bind. The viper may continue to bind the target for as long as it wishes, and its damage will begin to ramp up sharply, dealing 4-5 damage on the third turn of the bind, 7-8 damage on the fourth turn, 23 damage on the fifth turn, and 31 damage on the sixth turn. If the viper kills its target with the bind on its own turn, it will have only a single action point remaining.

Appearance
Vipers only have a single variant

Behavior
Enemy behavior is processed one action at a time. Figure out what they will do in the first action, and then figure out what they will do in the second action from their new position with their last action point. Actions are bolded. Actions higher on the list are always attempted first if the conditions are met. The conditions are italicized.

The Viper may take on one of many AI jobs. These generally affect their behavior in extremely minor ways, such as causing them to attack civilians in retaliations, attack the device in protect device missions, or helping determine where and how they will take cover.

Action 1
 * Retreat
 * Only if last surviving member of a pod, another pod exists, and the objective is not completed. 50% chance
 * If Melee is available (not burning)
 * Bind and crush
 * Requires cardinally adjacent enemy.
 * Tongue pull
 * Requires a cardinally adjacent empty tile, that the enemy is at least 4 tiles away, and that tongue pull has at least 50 hit.
 * Move as close to XCOM as possible, staying in cover
 * If melee is unavailable:
 * Move according to job
 * If its job or default AI considers its current square to be the optimal square, go to next step. The viper also uses this when moving while the pod is inactive
 * Overwatch, Multiple possible triggers, checked in the following order:
 * If two or more aliens are already overwatching, do not overwatch, even if the below conditions are true.
 * ''If it can see any XCOM operatives in a zone targeted by a two-turn attack (Psionic Rift, Wrath Cannon, or Blazing Pinions), 100% chance to overwatch. If one alien unit is already overwatching, 50% to overwatch.
 * If all available shots have less than 50 hit and nobody else overwatching, 25% to overwatch.
 * If the VIP is visible, 75% to overwatch. If at least one other alien unit overwatching already, 15% instead to overwatch.
 * If the EVAC and at least one XCOM unit is visible, 100% to overwatch. If at least one other alien unit overwatching already, 75% to overwatch.
 * Shoot
 * Reload
 * *Hunt XCOM, staying in cover
 * Called whenever it cannot see any XCOM units, or if the attacker cap has been reached for this turn.

Action 2
 * Bind and crush
 * Requires cardinally adjacent humanoid enemy
 * Poison Spit on 2 or more targets
 * The viper does not consider whether the potential targets are immune to poison
 * Tongue pull
 * Because tongue pull has a 1 turn cooldown, this can only be skipped if the first action was spent unsuccessfully trying to pull someone
 * Poison spit on 1 target
 * Overwatch, Multiple possible triggers, checked in the following order:
 * If two or more aliens are already overwatching, do not overwatch, even if the below conditions are true.
 * ''If it can see any XCOM operatives in a zone targeted by a two-turn attack (Psionic Rift, Wrath Cannon, or Blazing Pinions), 100% chance to overwatch. If one alien unit is already overwatching, 50% to overwatch.
 * If all available shots have less than 50 hit and nobody else overwatching, 25% to overwatch.
 * If the VIP is visible, 75% to overwatch. If at least one other alien unit overwatching already, 15% instead to overwatch.
 * If the EVAC and at least one XCOM unit is visible, 100% to overwatch. If at least one other alien unit overwatching already, 75% to overwatch.
 * Shoot
 * Reload
 * If flanked, move
 * Hunt XCOM, staying in cover
 * Called whenever it cannot see any XCOM units, or if the attacker cap has been reached for this turn.