There’s a goofy bit in here where a number can run above the allowed bounds. I tweaked the function just to say “don’t let it go above the allowed bounds.”
This isn’t really a Cobblemon issue to be fair, but Radical Cobblemon Trainer doesn’t properly register trainer Pokémon in the way Cobblemon expects them to be, so it thinks they’re wild. This checks to make sure there’s no original trainer on the trainer Pokémon, which RCT does correctly add to theirs.
There’s a bug in Cobblemon where if you try to cancel its thrown PokeBall event during a battle, the battle bricks. I fixed that such that it continues the battle properly.
There’s an oddity in Cobblemon’s code for the fossil revival machine where it spawns the entity, gives the entity the Pokémon, then fires the relevant event for reviving a Pokémon without telling the Pokémon what its entity is. Sounds weird, but it causes an issue where you can’t find the newly-spawned Pokémon’s entity from the event. This only happens if the player breaks the machine instead of using a PokeBall on it, because you don’t have an entity otherwise. Anyway, fixed that by attaching the entity to the Pokémon.