Magma Spray's replacement effect will exile the target creature if it would die this turn for any reason, not just due to lethal damage. It applies to the target creature even if Magma Spray deals no damage to it (due to a prevention effect) or Magma Spray deals damage to a different creature (due to a redirection effect).

Artwork
Loading artwork…
Magma Spray
The List · #AKH-141 · EN
Nonfoil—Foil—
Card rules
Magma Spray deals 2 damage to target creature. If that creature would die this turn, exile it instead.
"Ashes can't be embalmed." —Neheb, initiate of Ahn crop
Common · Illustrated by Svetlin Velinov
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Penny Legal
Pioneer Legal
PreDH Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions