If the targeted permanent or player is an illegal target by the time Explosive Revelation resolves, the spell doesn’t resolve. You won’t reveal any cards from your library.

Artwork
Loading artwork…
Explosive Revelation
Rise of the Eldrazi · #143 · EN
Nonfoil—Foil—
Card rules
Choose any target. Reveal cards from the top of your library until you reveal a nonland card. Explosive Revelation deals damage equal to that card's mana value to that permanent or player. Put the nonland card into your hand and the rest on the bottom of your library in any order.
Uncommon · Illustrated by Justin Sweet
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
PreDH Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Pioneer Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If all the cards in your library are land cards, you’ll reveal all of them, then arrange them in your library in whatever order you like. No damage is dealt.
Once you start revealing cards from your library, it’s too late for players to respond. If you target a creature, for example, its controller can’t wait to see how much damage will be dealt to it before casting a damage prevention spell, activating a regeneration ability, sacrificing it for some benefit, or anything else. Any such actions must be done before Explosive Revelation starts to resolve.