PRC8_fork/trunk/newspellbook/inv_castlament.nss
Jaysyn904 1662218bb4 Initial upload.
Adding base PRC 4.19a files to repository.
2022-10-07 13:51:24 -04:00

48 lines
1.5 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name Caster's Lament
//:: FileName inv_castlament.nss
//::///////////////////////////////////////////////
/*
Dark Invocation
8th Level Spell
With a touch you can attempt to dispel all effects
on a creature, as the break enchantment spell. The
maximum caster level for the dispel checks is 15.
*/
//::///////////////////////////////////////////////
#include "inc_dispel"
#include "inv_inc_invfunc"
#include "inv_invokehook"
void main()
{
if(!PreInvocationCastCode()) return;
object oTarget = PRCGetSpellTargetObject();
int nCasterLevel = GetInvokerLevel(OBJECT_SELF, GetInvokingClass());
int iTypeDispel = GetLocalInt(GetModule(), "BIODispel");
effect eVis = EffectVisualEffect(VFX_IMP_BREACH);
effect eImpact = EffectVisualEffect(VFX_FNF_DISPEL_GREATER);
//--------------------------------------------------------------------------
// Break Enchantment is capped at caster level 15
//--------------------------------------------------------------------------
if(nCasterLevel > 15)
nCasterLevel = 15;
if (GetIsObjectValid(oTarget))
{
//----------------------------------------------------------------------
// Targeted Dispel - Dispel all
//----------------------------------------------------------------------
if(iTypeDispel)
spellsDispelMagic(oTarget, nCasterLevel, eVis, eImpact);
else
spellsDispelMagicMod(oTarget, nCasterLevel, eVis, eImpact);
}
}