Magic resistance to spells of the 5th level grants the hero immunity to attacking spells, secondary damage spells, and curse spells (curse, weakening ray, etc.), provided that the enemy hero does not have artifacts that allow them to ignore magic resistance.