Pikachu must have jumped right before Earthquake hit. It only took damage from the aftershocks in the sand!