To cast a spell caster must make a saving throw with penalty equal to the level of the spell that is being cast. Following table must then be consulted.
saving throw effect
1 spellcaster must immediately make a saving throw vs. death
failed sanity loss: 1-3rd level spell 1d4 sanity loss; 4-6th level spell 1d6 sanity loss; 7-9th level spell
1d8 sanity loss
passed target: -1 to ST vs. spell
20 target: no ST vs. spell