Miracle Will's effect varies depending on the target. If it targets an opponent, it deals damage. If it targets an ally, it restores up to 50% of the target's maximum HP.
Pokémon affected by Heal Block cannot target their ally with Miracle Will (but they can target an opponent); if only the ally is affected by Heal Block but the user is not, Miracle Will can target it, but it will fail to heal it.