There’s no way I won’t come off like a dick, so here goes. I say this with the best of intentions, having only your post to go by.
OP, as a gun owner, this is something that you should already have an answer to. Do you have a concealed permit or regularly OC? Again, you should know the answer.
I’m not an attorney and my advice costs a lot less. But, you do have to be defending yourself or someone from death or serious harm. And you’ll be judged under the reasonable man doctrine. Would a reasonable man be in fear of death in the same situation? Don’t listen to the people that tell you “I was in fear for my life” are magic words. They aren’t. Someone in your yard? Not a threat. Someone in your yard during round after round into your home? Threat.
There are several incidents every year of otherwise respectable gun owners blasting away at a shape in the dark that turns out to be their child, a neighbor, a confused but harmless drunk. And they tend to pay for it, both legally and in a lifetime of knowing they shot the wrong person.
If you haven’t gotten training, it’s probably a good time. If not, read some blogs from guys like Greg Ellifritz or Grant Cunningham or even Mas Ayoob. They tend to cover lots of these issues.
If you are concerned, war game some scenarios about what you would do if rioters showed up in your block.
Stay frosty and good luck.