Reflective Carapace

Any time the creature is targeted by a magic missile spell, a line spell, or a spell that requires a ranged attack roll, roll a d6. On a 1 to 5, the creature is unaffected. On a 6, the creature is unaffected, and the effect is reflected back at the caster as though it originated from the creature turning the caster into the target. (Tarrasque, pp. 286, MM)