http://www.shrapnelcommunity.com/thr...rt=&PHPSESSID=
Look at the table in that thread.
Take the enemy's magic penetration and subtract your magic resistance. Call this value the enemy's "penetration advantage". If he is casting a normal spell his penetration is 11, if there isn't magic+2 or drain+2 scale, and he doesn't have a Spell Focus, and he doesn't have sufficiently high magic levels in the required path, and so on. So if your guy has magic resistance 18 then the caster's "penetration advantage" is -7. Looking in the table, his chance of penetrating your magic resistance (each time that he tries) is about 4%.
But keep in mind that repeated attempts can always get lucky. For example, if he casts this spell at you seventeen times in a row, then he has about a 50% chance of getting through at least one time.