Put a +1/+1 counter on target creature you control. Then that creature deals damage equal to its power to target creature or planeswalker you don't control.
If either target is an illegal target as Domri’s Ambush tries to resolve, the creature you control won’t deal damage.
If the creature you control is an illegal target as Domri’s Ambush tries to resolve, you won’t put a +1/+1 counter on it. If that creature is a legal target but the other target isn’t, you’ll still put the counter on the creature you control.
You can’t cast Domri’s Ambush unless you choose both a creature you control and a creature or planeswalker you don’t control as targets.