The relevant laws stipulate the Criminal Code of People's Republic of China (PRC).
Article 20 In order to protect the state, public interests, the person, property and other rights of oneself or others from ongoing unlawful infringement, stopping the unlawful infringement and causing damage to the unlawful infringer, it is justifiable defense and does not bear criminal responsibility.
If justifiable defense obviously exceeds the necessary limit and causes great damage, criminal responsibility shall be borne, but the punishment shall be mitigated or exempted.
Taking defensive actions against violent crimes such as assault, murder, robbery, rape, kidnapping, etc., which seriously endanger personal safety, and causing casualties of illegal infringers, is not excessive defense and does not bear criminal responsibility.
Article 21. In order to protect the state, public interests, personal, property and other rights of oneself or others, those who have to take emergency measures to avoid risks and cause damage shall not be held criminally responsible.
If the emergency avoidance exceeds the necessary limit and causes undue damage, criminal responsibility shall be borne, but the punishment shall be mitigated or exempted.
The provisions of the first paragraph on avoiding personal danger do not apply to people who have specific responsibilities in their posts and businesses.