Yeah, not with the Diancie permamega anyway, but I do think that goes for all of them.
Just tried using a Permamega in a passerby battle, didn't work, nor does hacked Pokemon from X and Y, sorry if anyone's already said this but it is kinda disappointing that you can't use them in battle.
probably works on local. just store in box.