Isaac's Lesser Missile Storm

Spell Description
Caster Level(s) Wizard/Sorcerer 4
Innate Level 4
School Evocation
Descriptor(s) Force
Component(s) Verbal, Somatic
Range Long
Area of Effect / Target Gargantuan
Duration Instant
Save None
Spell Resistance Yes
Additional Counterspells None
Dispel No
Description A number of energy missiles (one per caster level but to a maximum of 10) appear and randomly target and hit any hostile creature in the area of effect. If there are more creatures than missiles, only the closest targets will be damaged. If there are more missiles than creatures, one of the creatures will be hit with multiple missiles. Each missile does 1d6 points of damage.

Spell Scripts
Main x0_s0_missstorm1

Changes/Updates for Thain
Script Change Custom GetCasterLevel function
Before Get the level of the casterclass used or item property
After Get the level of the casterclass used or item property, pluss any modifiers (Palemaster++)
Script Change Custom ResistSpell function
Before Checks for Absorbtion (Spell mantle), Immunity and SR
After Same as before, just a wrapper for easy later change
Script Change Reduced max number of missiles pr. target
Before Up to max number of missiles
After Up to Caster Level / 3 + 1

Concept: Ankh_Phoenix and Aremah, Code: Ankh_Phoenix