Softboiled restores up to 50% of your Pokémon's original HP. Outside of
battle, Softboiled can be used to heal other Pokémon that you are
carrying. The Pokémon using Softboiled removes up to 20% of its own HP and
restores them to the wounded Pokémon.
Note that this attack will fail if the difference between the
attacker's current HP and its maximum is 511, 255, or 0
As an example, a Snorlax friend of mine has a maximum HP of 523 and was
down to just 12 HP in battle. He tried to Rest off the damage, but Rest
failed several times while his opponent was sleeping! (523 minus 12 is
511.) He lost the match and his trainer nearly had a stroke. Do the math
and don't let this happen to you.