There are various Codes that influence our Conduct and Behavior --- the 10 Commandments is an example . I must offer an Ancient Kung Fu >Code of Engagement< that has survived as both Viable and Valuable .
When Confronted by someone or something that has intent to harm :
"Run away .
Deter rather that hurt .
Hurt rather than maim .
Maim rather than kill .
Kill or be killed . "
All of these are considered by "Good" Kung Fu Master .