Hey there. Your "gain exp on capture" thingy works fine, but if the Pokemon in battle levels up after capturing something, then learns a new move, upon returning to the battle screen again, the wild Pokemon you caught will still be there as if you never caught it in the first place. The battle still ends, though. Similiar issue with Doesnt's version.