Pharika’s Cure deals 2 damage to target creature and you gain 2 life.
"The venom cleanses the sickness from your body, but it will not be pleasant, and you may not survive. Pharika's blessings are fickle."
—Solon, acolyte of Pharika
If the creature is an illegal target as Pharika's Cure tries to resolve, it won't resolve and none of its effects will happen. You won't gain life. If, on the other hand, Pharika's Cure does resolve but the damage is prevented, you'll still gain life.
Random a card of Magic: The Gathering (MTG), but you can also roll the D20 dice, random a Planeswalker, have fun with the random rules and more.