In general modding and recreating Pokemon games is illegal and the Pokemon company (a conglomerate of Nintendo, Game Freak, and Creatures inc.) is notorious for sending DMCAs towards fanmade games.
A quick Google search will yield many results of fanmade games being shut by Nintendo, even in cases where the games do not make profit and use a disclaimer to show they are not affiliated with the Pokemon company and acknowledge the copyrights, as even when doing those things the work does not qualify as fair use under the law. The most notable case that comes to mind is the fanmade game Pokemon Uranium.
But there's a bit of a debate on whether or not they are getting excessive with this even if they technically have the right. In fact, I remember the Pokemon company sending a cease and desist to a fan who was throwing a Pokemon themed party. He wound up owing $5,400 USD. Here's the article , and another one. They also sent a cease and desist to a lady who was making little Bulbasaur themed planters (here).
There are other examples of them sending out DMCAs but it kinda goes down a rabbit hole and if I talk about it here I might get modded.
But long story short, it probably isn't a good idea to tempt them...