My code is, if its hostile, kill it for survival, if its evil (like really evil) kill it for the greater good, if any of those things apply I could kill anything, since its all for the greater good, for my survival, survival of my friends, family and etc. I could proberley kill multiple things if I had reason.
(This is real life, btw)
But killing for no reason (Or being evil) is the worst thing to do and if you do that your life is void to me and you might just get shot or killed by me.
(In games) it is much different I still kill for survival and good but If I have to kill to forward the plot, I will.