spellsDispelMagic(object, int, effect, effect, int, int)

Dispel magic on one or multiple targets.

void spellsDispelMagic(
    object oTarget,
    int nCasterLevel,
    effect eVis,
    effect eImpac,
    int bAll = TRUE,                
    int bBreachSpells = FALSE
);

Parameters

oTarget

The object you want to dispel.

nCasterLevel

The highest level spell to dispel.

eVis

The visual effect to apply.

eImpac

Not used.

bAll

Dispel all spells or just one. (Default: TRUE)

bBreachSpells

Dispel spells or not. (Default: FALSE)


Description

Attempts a dispel on one target, with all safety checks put in.

Doesn't dispel magic on petrified targets.



Remarks

If bAll is TRUE then EffectDispelMagicAll is called and will dispel up to six spells of equal or lesser level than nCasterLevel. If bAll if FALSE then EffectDispelMagicBest is called and will dispel the highest level spell effect (up to two spells) on them up to nCasterLevel.

If bBreachSpells is TRUE then DoSpellBreach is called to perform the dispel. If DoSpellBreach is FALSE, no dispelling takes place.


Requirements

#include "x0_i0_spells"


Version

???

See Also

functions:  EffectDispelMagicAll | EffectDispelMagicBest
categories:  Spells Functions


author: Mistress