8th-level evocation (sorcerer, wizard)
You summon a fist-sized eyeball with a prismatic iris that can fire rays of light. The eye appears in an unoccupied space that you can see within range and lasts the duration.
You mentally receive visual information from the eye, which has normal vision and darkvision out to 60 feet. The eye can look in every direction.
The eye is a Tiny object that has an AC 20. The eye can’t be destroyed by damage and can’t be entirely dispelled by dispel magic. However, certain conditions can cause the eye to lose its rays, as described below. Once the eye has lost all seven of its rays, the spell ends.
When you cast the spell – and as a bonus action on each of your turns thereafter – you can move the eye up to 60 feet, but not beyond the range of the spell, and cause it to fire a random beam at creature you can see within 60 feet of the eye. The target must make a Dexterity saving throw. Roll a d8 to determine which color ray is used. If you roll a ray that has been lost, nothing happens.
Red. The target takes 10d6 fire damage on a failed save, or half as much damage on a successful one. This ray is lost if the eye takes at least 10 cold damage.
Orange. The target takes 10d6 acid damage on a failed save, or half as much damage on a successful one. This ray is lost if the eye is subjected to a strong wind.
Yellow. The target takes 10d6 lightning damage on a failed save, or half as much damage on a successful one. This ray is lost if the eye takes at least 25 force damage.
Green. The target takes 10d6 poison damage on a failed save, or half as much damage on a successful one. This ray is lost if the eye is in magical darkness created by a darkness spell or a similar spell of equal or higher level.
Blue. The target takes 10d6 cold damage on a failed save, or half as much damage on a successful one. This ray is lost if the eye takes at least 10 fire damage.
Indigo. On a failed save, the target is restrained. It must then make a Constitution saving throw at the end of each of its turns. If it successfully saves three times, the spell ends. If it fails its save three times, it permanently turns to stone and is subjected to the petrified condition. The successes and failures don't need to be consecutive; keep track of both until the target collects three of a kind. This ray is lost if the eye is in bright light shed by a daylight spell or a similar spell of equal or higher level.
Violet. On a failed save, the target is blinded. It must then make a Wisdom saving throw at the start of your next turn. A successful save ends the blindness. If it fails that save, the creature is transported to another plane of existence of the GM's choosing and is no longer blinded. (Typically, a creature that is on a plane that isn't its home plane is banished home, while other creatures are usually cast into the Astral or Ethereal planes.) This ray is lost if the eye is targeted by a dispel magic spell or a similar spell of equal or higher level that can end spells and magical effects.
Special. The eye fires two rays. The rays either strike the same target or you can choose for one ray to target another creature within 60 feet of the eye. Roll twice more, rerolling any 8.
At Higher Levels. If you cast this spell using a 9th level spell slot, the duration is 10 minutes and there is no limit to how far away from you the eye can move.
Inspired by Prismatic Eye from the Spell Compendium (3.5e)