This depends largely on the specific circumstances, the laws of the state, and the political climate.It should be noted that your question and scenario don't really match up. In the scenario, the store owner is trying to stop a robber, not a mass shooter. I think this is important. If someone stops a mass shooter, I can't imagine it being politically beneficial to prosecute that person, even if someone else was shot. Not only did they avert a major tragedy but it's easy to argue that the bystander was no worse off than if the shooter had been allowed to continue and shoot said bystander quite intentionally.In a robbery, it's a bit different. While many states allow you to kill a robber, you arguably have an ethical duty, if not always a legal one, to put the lives of those around you above a piece of property. I'm pretty sure that in some states this would be a crime whereas in others you would be fine. It's also worth noting that there are plenty of cases of police accidentally shooting bystanders while attempting to bring down a criminal.However, be aware that criminal and civil liability are not the same thing. Just because you don't get charged does not mean that you won't get sued.