@matrix why would "the law" have anything to do with a situation of unlawlessness?
Every time these cases come up they always ask the question "did you need to kill a person or could you avoid it?" If you could avoid killing someone then they lock you up no question.
Let's be real here. When shit like CHAZ gets promoted and defended can you really avoid violence? Who cares if he has a gun? He could have a hammer and do the same thing. If the average person thinks that they're not safe from a riot they're not going to consider him guilty.
My sane opinion:
If you're going to a riot with a weapon you are definitely intending to use it.
However if you told me to be on a jury about this guy I would say I would ignore every fact about the case and call him not guilty. In fact if probably lie to hide my bias to find him not guilty. Local governments don't get to promote defunding the police and say you can't defend yourself those opinions can't mix.