>>30299162The game has no way of processing whether either of its parents are illegal or not. That data isn't stored. It checks what moves it knows, EVs, IVs, PID.
You could hack in a Ditto with Darkest Lariat, Hyperspace Hole, Moongeist Beam, and Splash and breed it with anything, and its offspring will not be recognized as illegal. Though you obviously wouldn't want to use the Ditto for anything else other than breeding.
Shit, pkhex is almost certainly still better at recognizing what Pokemon are illegal or not. Example: Ray Rizzo and his Dream Ball Aegislash. Lure Ball Ludicolo.