If I am under Sanctuary and ready an action to cast a spell such as Shocking Grasp, what actually happens? Sanctuary says:
If the warded creature makes an attack, casts a spell that affects an enemy, or deals damage to another creature, this spell ends
Readying a spell says:
When you ready a spell, you cast it as normal but hold its energy, which you release with your reaction when the trigger occurs. To be readied, a spell must have a casting time of 1 action, and holding onto the spell's magic requires concentration. If your concentration is broken, the spell dissipates without taking effect. For example, if you are concentrating on the web spell and ready magic missile, your web spell ends, and if you take damage before you release magic missile with your reaction, your concentration might be broken.
So since I'm holding the energy of the Shocking Grasp, I believe the spell does not affect its target before its released. Would I be protected by Sanctuary until the readied action takes place? It seems that way to me, but then again the spell is cast and does affect an enemy...it just hasn't affected the enemy yet. I guess it comes down to parsing "a spell that affects an enemy"; does this mean "a spell that, at some point, affects an enemy" or "a spell that affects an enemy in this instance"?