This spell can target any creature. The check for whether that creature is attacking or blocking made on resolution, and it will have the appropriate effect at that time.

Artwork
Loading artwork…
Sewers of Estark
HarperPrism Book Promos · #2 · EN
Nonfoil—Foil—
Card rules
Choose target creature. If it's attacking, it can't be blocked this turn. If it's blocking, prevent all combat damage that would be dealt this combat by it and each creature it's blocking.
Rare · Illustrated by Melissa A. Benson
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Old School Legal
PreDH Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny 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 the creature is neither an attacking creature nor a blocking creature at the time the spell resolves, it will have no effect.