At least if you are doing unnecessary damage to the person. For example, if you are just defending yourself, it is okay. If the robber was not armed and you shoot him/her down, you will be prosecuted for that.