Very nice update, I love that you keep improving! Thank you for adding the "debug" toggle, I think it's a great tool for someone who is just playing for fun or wants to learn better.
Bug Report:
When playing a Grass/Fighting vs Grass/Fighting, I got into a situation where my golbat was poisoned and confused by my opponent's koffing. I attempted to retreat (no cost needed), but failed due to the coin flip needed since Golbat was confused. It left me in a state where it showed the "choose a pokemon" state, but no option I clicked on could progress the game.