Hammer and machete battle ends in police shooting