For the fireball, just modify an orb effect and have it shoot out a modified firebolt (if you want stun) or a single-target damage spell if you don't want the stun. Make sure to zero out the mana costs and casting time for the orb-trigger spell. This, however, will make you unable to use other orb effects on that unit.
As for the other, you'll have to trigger it to check upon unit being attacked. Do an if-then-else, using a random integer from 1-10 (and only going to the "then" on a 1), give the attacked unit divine shield and force him to cast it.