Implement the rest glitch

implements the glitch where rest will fail if the pokemon hp is 511 or 255 
below max hp.
Merge pull request #8 from MJB47/patch-22

Implement the rest glitch