You'd definitely go to jail in CA, especially since there's no legal way to carry a loaded gun here - you shoot an attacker and you're not in or on your own property, they'll get you for illegal possession of a loaded firearm. Of course, this being CA, even if you're in your own house, they'll probably still arrest you.