Agents, a rescued Courier or Prisoner, most guards, and turrets are able to attack enemies under certain circumstances. Most attacks either deal KO or lethal damage to their target, though the TAG pistol and the EMP attack that Dr. Xu augment allows are exceptions. Attacks never consume any AP, but most non-guards are limited to one attack per turn.
All attacks by agency-controlled units (except the EMP attack that Dr. Xu augment allows) require the user to use a weapon and equip it, which determines when the attack can be performed, what it does to the target, and what it costs to use the attack.
A Stim III can be used to replenish an agency unit's attack after it is used, and a Stim IV can be used to give an agency unit an infinite number of attacks that turn.
Attacks can be prevented if:
Prevented attacks simply do not happen. Any buttons to perform attacks that are prevented for some reason either do not appear at all or are disabled. If disabled buttons are hovered over, an explanation of why the attack is prevented will appear.
If an agency controlled unit with an active melee weapon has an attack remaining, they can enter an ambush stance. When in ambush stance, they will perform a melee attack on the first guard they see that walks to a tile adjacent to them or opens a door adjacent to them that they are able to attack with the equipped weapon.
Ambushing units will ignore guards they are unable to attack with their weapon, and remain on ambush in this case; they will not “try” to attack in this situation.
The agency controlled unit will attack before the guard has a chance to raise the alarm tracker, shout, or anything else. Ambushing is not affected by the Expert Plus restriction that guards are immune to melee attacks from agents they see.
Note that if an agency controlled unit is overwatched, they will remain on ambush stance, and if they attack as a result of being in this stance, they will immediately be shot.
If a unit makes an attack during the corporation's turn while on ambush, it consumes the previous turn's attack. Therefore, the unit will be able to attack next turn.
If an agency controlled unit with an active ranged weapon has an attack remaining, they can enter an overwatch stance. When in overwatch stance, they will perform a ranged attack on the first guard that acts in their line-of-sight that they are able to attack with the equipped weapon.
Overwatching units will ignore guards they are unable to attack with their weapon, and remain on overwatch in this case; they will not “try” to attack in this situation.
The agency controlled unit will attack before the guard has a chance to raise the alarm tracker, shout, or anything else.
Note that if an agency controlled unit is overwatched, the agency controlled unit will remain on overwatch stance, and if they attack as a result of being in this stance, the overwatching agency controlled unit will immediately be shot. If the unit entered overwatch stance after being overwatched, the original overwatcher will shoot first (but in this case, you can simply attack instead of overwatching, provided your weapon is able to attack the overwatching enemy).
If a unit makes an attack during the corporation's turn while on overwatch, it consumes the previous turn's attack. Therefore, the unit will be able to attack next turn.