As someone who is trying to re-create the Pokémon system, I am running into similar issues. There many things going on a single "turn", especially with abilities that can pretty much change any of the game rules.
You are not only one trying to do it. There are others, and in other programming languages (Pokemon Showdown is one already implemented, but uses TypeScript with dependencies and I wanted to avoid those issues). What programming language did you intend to use?
I intended to do as a C library (which would then be available for other programs in C to call). I know many of the rules of Pokemon but not all of the cases, and then, knowing the data structures to make, etc. I also wanted to make the rules customizable (and to implement all generations, although perhaps only some of them will be implemented the first time and others later) and I have some ideas about that.
I would hope that some people can work on something together.
I am also using typescript and taking pokerogue and showdown as inspirations. Since my game is a nethack-like game, it isn't exactly the same, but I am using the mainline games move sets, formulas, abilities and trying to copy them.
I am also attempting to make it functional, the engine receives a game state and returns a new game state. I am using pure React for rendering but I plan moving it to canvas if I ever want to add more special mechanics. I am focusing mostly on functionality for now, it's very early stage but it already works.
I intended to do as a C library (which would then be available for other programs in C to call). I know many of the rules of Pokemon but not all of the cases, and then, knowing the data structures to make, etc. I also wanted to make the rules customizable (and to implement all generations, although perhaps only some of them will be implemented the first time and others later) and I have some ideas about that.
I would hope that some people can work on something together.