Added boolean swing arm parameter to attack

function attack(target) // defaults swing = false
function attack(target, swing)