spellsDispelAoE(object, object, int)

Handles dispel magic of area of effect spells.

void spellsDispelAoE(
    object oTargetAoE,
    object oCaster,
    int nCasterLevel



The area of effect object you wish to examine.


The object that cast the spell.


oCaster's spell class level to use.


Handles dispel magic of area of effect spells.

Before adding this AoE's got automatically destroyed. Since NWN does not give the required information to do proper dispelling on AoEs, we do some simulated stuff here:
  - Base chances to dispel are 25 (Lesser Dispel), 50 (Dispel Magic), 75 (Greater Dispelling) and 100% (Mordenkainen's Disjunction).
  - Chance is modified positive by the caster level of the spellcaster as well.
  - As the relevant ability score.
  - Chance is modified negative by the highest spellcasting class level of the AoE creator and the relevant ability score.
It is bad, but it is not worse than just dispelling the AoE as the game did until now.


#include "x0_i0_spells"



See Also

categories:  Spells Functions

author: Mistress, editor: Kolyana