Implement the rest glitch

implements the glitch where rest will fail if the pokemon hp is 511 or 255 
below max hp.