Man kills longtime friend in bizarre sword attack