Endure Elements

Spell Description
Caster Level(s) Cleric 1, Druid 1, Paladin 1, Wizard/Sorcerer 1
Innate Level 2
School Abjuration
Descriptor(s) Protection
Component(s) Verbal, Somatic
Range Touch
Area of Effect / Target Single
Duration 24 Hours
Save Harmless
Spell Resistance No
Additional Counterspell(s) None
Dispel Yes
Description The target creature gains damage resistance 10/- against all elemental forms of damage. The spell ends after absorbing 20 points of damage from any single elemental type.

Spell Scripts
Main nw_s0_endele

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 ApplyEffectToObject function
Before Adds a given effect to object
After Same as before, but saves some variables. This is to fix the Dispel spells (Palemaster++)
Script Change Changed duration of visual effect
Before Duration as long as spell duration
After Only lasts for 10 seconds
Bugfix Fixed metamagic code
Before Not affected by Metamagic EXTEND
After Metamagic EXTEND double the duration
Bugfix Changed duration to match spell description
Before 1 Hour / Level
After 24 Hours

Concept: Ankh_Phoenix and Aremah, Code: Ankh_Phoenix