added a boolean to check if the pokemon is fainted