Fix attacking

Moved the working weapon range check into weapon.
Fixed attacking so that units will not attack when they are moving.