added enemy parameter to attack