I would take some sort of training. Make sure you document some how. Say send it to your self certified mail. And then put it away if you are ever involvled in a shooting then you have or can show you have had some training. Has far a hold up or armed robbery goes. I would shoot to stop the threat. If that mean taking a life to do so I would but I make sure of my shot and I would watch where the bullet goes. Meaning would I hit some else and posible kill or hurt them. I think I would shot for a arm or leg hoping I would knock them down. Wounding them enough to stop the threat and remove the gun and have myself call police or have some else do that. Remember there is always civil court and you be responsable for shooting that would be robber. But If I had do it that that's what I would do. But most important take a class of some sort.
Sorry that's just my two cents.
Shooting someone "in the leg" is risky, legally. It could be used to show that you weren't really in fear for your life or SBI. If that's the case attempting to kill someone (& that's what shooting at someone is, even if it's in the arm) is illegal.
Read the IC & understand it. You have to reasonably believe that you or a third party is in danger of facing death/severe bodily injury or you're stopping a forcible felony (fortunately armed robbery is a FF) before you can use deadly force on someone in self-defense.
I'm not saying you will be charged but why take the risk if you don't need to while still getting the job done in the first place. The BG made the decision to put his life on the line when he decided to threaten someone elses life in pursuit of monetary gain.