It's well-known that PokeMMO doesn't get shut down by not distributing Nintendo's assets, but what exactly are considered their copyrighted assets?

Is there a specific rule of what are considered copyrighted materials in Pokemon ROMs? If there was a copy of Pokemon but with different texture, different music and different character names, would it be copyrighted? Can variables' and functions' names be copyrighted too?