Cloud of Bewilderment

Spell Description
Caster Level(s) Bard 2, Wizard/Sorcerer 2
Innate Level 2
School Evocation
Descriptor(s) Gas
Component(s) Verbal, Somatic
Range Short
Area of Effect / Target Huge
Duration 1 Round / Level
Save Fortitude
Spell Resistance Yes
Additional Counterspell(s) None
Dispel Yes
Description The caster blows forth a cloud of noxious air. Enemies in the area of effect are stunned and blinded for 1d6 rounds.

Spell Scripts
Main x2_s0_cldbewld
AoE OnEnter x2_s0_cldbewlda
AoE Heartbeat x2_s0_cldbewldc

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 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 Custom GetSpellSaveDC
Before Returns Save DC of spell: 10 + Spell Level + Spell Focus
After Same as before, just a wrapper to easy add alternate DC for items and maybe more later
Script Change Dispel of AoE changed to fit description of dispel
Before Base Chance: Lesser - 25%, Dispel - 50%, Greater -75%, Mordenkainens - 100 %.
Chance modified by caster level: Base Chance + ( CLevel + CMod ) - ( 10 + CMod ) * 2
NPC caster: Modified chance + 30
Caster of spell that is being atempted to dispel: Chance = 100%
DM trying to dispel: Chance = 100%
After Dispel Roll: d20 + CLevel. Where CLevel is capped: Lesser - 5, Dispel - 10, Greater - 15, Mordenkainens - No cap
Dispel DC: 11 + CLevel of caster of spell
Bugfix Fixed event about spell effect casted (used by NPC to find out who cast the spell)
Before Sent AoE as caster of spell
After Sends Caster of AoE as spell caster

Concept: Ankh_Phoenix and Aremah, Code: Ankh_Phoenix