Added a check for moving before attack.