If the ship is hit when its repairing, it will go to the corner to repair with no npc around. If the ship has go to the corner but got shoot again while repair function is runnig it will go to another corner to finish repair. Once its get repaired it returns to attack.
It's true that is possible to make this action with more performance. I will give a look
Regards
It's true that is possible to make this action with more performance. I will give a look

Regards