Ill. statute -- self defense as defense to gun law allegations
Illinois has an interesting statute -- while they don't have statewide pre-emption, the fact that a person used a gun in self-defense (on their own land) is an affirmative defense to a charge under local gun laws. I suppose it is a bit peculiar, but one practical way to deal with the situation where a citizen self-defends, and gets charged with a gun law violation.
(720 ILCS 5/24-10)
Sec. 24-10. Municipal ordinance regulating firearms; affirmative defense to a violation. It is an affirmative defense to a violation of a municipal ordinance that prohibits, regulates, or restricts the private ownership of firearms if the individual who is charged with the violation used the firearm in an act of self-defense or defense of another as defined in Sections 7-1 and 7-2 of this Code when on his or her land or in his or her abode or fixed place of business.
(Source: P.A. 93-1048, eff. 11-16-04.)