Every person has a right subject to the restrictions in section 31 to defend his own body and the body of any other person against any offence affecting the human body and the property whether movable or immovable of himself or of any other person against theft robbery mischief or criminal trespass or any attempt to commit the same.