It appears another "gigaleak" has gone down, involving Nintendo. According to sources online, it appears that Game Freak has been hacked, resulting in internal data from the company being leaked to the public. Those involved in the hacking community or those within general Pokemon related groups...
You can’t patent code, and it’s automatically copyright protected. Nintendo just needs to prove they wrote the code originally, which should be easy.