Feel free to mess around with this! It's not super done or polished but it's got pretty much everything form gen 3 in it (battle wise). You'll have to click the flag to reset battles.
I got relatively close to completion, and had a working prototype of the online battles. Unfortunately I lost motivation due to the size of the project, and also it kinda felt like I was putting too much time into a battle sim when showdown is right there. GameFreak The Pokemon Company