Legendary sorceries have a special additional casting requirement defined in the Comprehensive Rules. Specifically, CR 130.4 states that a player may cast a legendary sorcery only if they control a legendary creature or legendary planeswalker. This is an additional cost/condition checked when you attempt to cast the spell.
Note that the requirement is specifically a legendary creature or legendary planeswalker — not just any legendary permanent. Controlling a legendary land or legendary artifact alone does NOT satisfy the requirement (CR 130.4).
If you do not control a qualifying legendary permanent at the time you would cast the legendary sorcery, you simply cannot cast it — it cannot be put on the stack at all.
Example: You want to cast Urza's Ruinous Blast (a legendary sorcery). You control a Karn, Scion of Urza (a legendary planeswalker). That satisfies the requirement, so you may cast it. If instead your only permanent were a Urza's Tower (a legendary land), you could NOT cast the sorcery.
Once the legendary sorcery is on the stack, opponents cannot make you lose the ability to cast it retroactively by destroying your legendary creature or planeswalker — the requirement is only checked at the moment of casting (CR 601.2).
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.