isDefending var and switch