Stop hitting when the enemy is down

Refactored check attack so units stop attacking when the enemy is down