How do you get a master ball in sapphire?

Well I've done this before, you go to mauville city and then talk to all the people there but you have to find a secret person he is dressed as a ninja he is in the Pokemon center. you click AAXXBBYY (if you have a d.s.) left right and he'll appear then he'll ask you if you want a master ball then you have to battlle him. I promise you you'll win. Then you'll get it.