Improved attack functionality of enemy AI