Part of the aggressiveness of Enforcers if they have a chance to swap to shooting whenever they are hit by something. That chance doubles as 'accuracy' reduction by resetting action count before a bullet is shot at Duke.
state checklizhit
(...)
ifp palive
ifcansee
ifcanshoottarget
ifrnd 96
{
ai AILIZSHOOTENEMY
break
}
ends
Setting the chance too high causes the Enforcer to 'miss' every shot and make no firing SFX
If you take this on-hit approach with other enemies you'll want to make exceptions for when those enemies are shooting or flinching lest they cancel the action partway
The other reason is the Enforcer seekstate has counts below 3 seconds to start shooting for close & far ranges, and a charge state that guarantees it no matter the distance.
For comparison the Trooper only has shoot chances after stopping, after fleeing, and after unhiding.