It would be a very interesting engineering challenge to design a nuclear warhead that can do a partial detonation even if damaged by some AA, but I don't think anyone has done that.
Apparently, the British managed, albeit inadvertently. In the 1950's they did not have access to American research on the behaviour of plutonium under extreme conditions any longer, so they to increase yield they built fission bombs with a larger amount of fissile material. There was the risk that during a crash landing and fire the conventional explosives cooking off would cause a fission reaction at a substantial fraction of design yield, consequently the cavity was filled with ball bearings to be removed only immediately before actual use.