Ok, I'm not a Republik of Kalifornia resident, or lawyer. But I can show you some examples from Washington state law:
RCW 9A.16.110
Defending against violent crime -- Reimbursement.
(1) No person in the state shall be placed in legal jeopardy of any kind whatsoever for protecting by any reasonable means necessary, himself or herself, his or her family, or his or her real or personal property, or for coming to the aid of another who is in imminent danger of or the victim of assault, robbery, kidnapping, arson, burglary, rape, murder, or any other violent crime as defined in RCW 9.94A.030.
(2) When a person charged with a crime listed in subsection (1) of this section is found not guilty by reason of self-defense, the state of Washington shall reimburse the defendant for all reasonable costs, including loss of time, legal fees incurred, and other expenses involved in his or her defense. This reimbursement is not an independent cause of action. To award these reasonable costs the trier of fact must find that the defendant's claim of self-defense was sustained by a preponderance of the evidence. If the trier of fact makes a determination of self-defense, the judge shall determine the amount of the award.
RCW 9A.16.050 "Homicide - By Other Person - When Justifiable"
"Homicide is also justifiable when committed either:
(1) In the lawful defense of the slayer, or his or her husband, wife, parent, child, brother, or sister, or of any other person in his presence or company, when there is reasonable ground to apprehend a design on the part of the person slain to commit a felony or to do some great personal injury to the slayer or to any such person, and there is imminent danger of such design being accomplished; or
(2) In the actual resistance of an attempt to commit a felony upon the slayer, in his presence, or upon or in a dwelling, or other place of abode, in which he is."
So basically this covers us for defending ourselves against attack. After these basics we get into 'disparity of force' laws (which are really REALLY bad ideas) and other little loopholes. The general point is; defend yourself now and sort the rest out later.