When one unit has a higher Attack Target Priority (ATP) than other units, the higher priority unit or building is attacked first by the default tactical AI. The ATP value can range from 0-20 though only 5 numbers are used (0, 10, 11, 19, 20).
Whenever other units are nearby, Override Target Priority (OTP) is used instead of ATP. An OTP of 0 means "use ATP value". So even though workers have ATP 20 they won't have the same priority when other units/buildings are nearby because of their lower OTP. All units and buildings have an OTP value. Workers and MULES have OTP value 10, while other units and buildings have value 0.
- ↑ When an SCV is repairing a unit, it takes on the same priority as the unit it's repairing. See Repair: Targeting Priority for details.