197.
(a) Homicide is also justifiable when committed by any person in all any of the following cases:(1) When resisting any attempt to murder any person or person, to commit a felony, or to do some great bodily injury upon any person.
(2) When committed in defense of a
habitation, property, or a person, against one who manifestly intends or endeavors endeavors, by violence or surprise, to commit a felony, or against one who manifestly intends and endeavors, in a violent, riotous, or tumultuous manner, to enter the habitation of another for the purpose of offering violence to any person therein.
(3) When committed in the lawful defense of such person, or of a spouse, parent, child, master, mistress, or servant of such person, when there is reasonable ground to apprehend a design
to commit a felony or to do some great bodily injury, and imminent danger of such design being accomplished.
(b) Homicide is not justifiable when committed by a person in all of the following cases:
(1) When the person was outside of their residence habitation or property and knew that using force likely to cause death or great bodily injury could have been avoided with complete safety by retreating.
(2) When the person used more force than was reasonably necessary to defend against a danger.
to defend against an imminent danger of being killed or suffering great bodily injury than a reasonable person would believe is necessary in the same situation.
(3) When the person was the assailant, engaged in mutual combat, or knowingly engaged in conduct reasonably likely to provoke a person to commit a felony or do some great bodily injury, except if either of the following circumstances apply: When the person was the initial aggressor, except if either of the following apply:
(A) The person reasonably believed that they were in imminent danger of death or great bodily injury, and had exhausted every reasonable means to escape such danger other than the use of force likely to cause death or great bodily injury. The
initial aggressor actually and in good faith tried to stop fighting and indicated to the opponent, by word or by conduct and in a way that a reasonable person would understand, that the initial aggressor wanted to stop fighting and had stopped fighting.
(B) In good faith, the person withdrew from the encounter with the other assailant or assailants and indicated clearly to the other assailant or
assailants that the person desired to withdraw and terminated the use of any force, but the other assailant or assailants continued or resumed the use of force. In cases of mutual combat, the initial aggressor gave the opponent an opportunity to stop fighting.
(c) Nothing in this section shall alter the presumption set forth in Section 198.5 in favor of one who uses deadly force against an intruder within their residence.