Vanilla Protection From Energy

Protection From Energy
(Abjuration)

Level: 8
Range: Touch
Duration: 1 round/level
Casting Time: 8
Area of Effect: 1 creature
Saving Throw: None

When the spell is cast, it confers 75% immunity against all energy attacks—such as fire, cold, acid, magic, and electricity, whether from magical or non-magical sources—such as spells, weapons, wands, breath weapons, etc. This excludes any physical attacks and spell-created weapons, such as Enchanted Weapon and Spiritual Hammer. In other words, any physical damage, such as piercing, crushing, or slashing will get through. This effect lasts for the duration of the spell or until dispelled.