Test for invalid pokemon during a battle

Related to issue #824