When an act which would otherwise be a certain offence is not that offence by reason of the youth the want of maturity of understanding the unsoundness of mind or the intoxication of the person doing that act every person has the same right of private defence against that act which he would have if the act were that offence.