add protection ability

I tried to implement the first version of protection ability in my head.Still, the hardest part is naming the variables and methods, help me correct it if it's terrible.