PRC8/nwn/nwnprc/trunk/newspellbook/inv_witchwood.nss
Jaysyn904 fb88c718bd Added Force Missiles spell
Added Force Missiles spell. Fixed Shadowcaster Marker feat check. Updated Witchwwod step to grant immunity to Vine Mine & Spike Growth.  Updated release archive.
2024-05-23 07:45:01 -04:00

46 lines
1.5 KiB
Plaintext

/*
Witchwood Step
*/
#include "prc_sp_func"
#include "inv_inc_invfunc"
#include "inv_invokehook"
// int SPELL_VINE_MINE_ENTANGLE = 530;
// int SPELL_VINE_MINE_HAMPER_MOVEMENT = 531;
void main()
{
if (!PreInvocationCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
object oCaster = OBJECT_SELF;
int CasterLvl = GetInvokerLevel(OBJECT_SELF, GetInvokingClass());
object oTarget = PRCGetSpellTargetObject();
effect eWeb = EffectImmunity(IMMUNITY_TYPE_ENTANGLE);
effect eVMEntagle = EffectSpellImmunity(SPELL_VINE_MINE_ENTANGLE);
effect eVMHamper = EffectSpellImmunity(SPELL_VINE_MINE_HAMPER_MOVEMENT);
effect eSpikeGrowth = EffectSpellImmunity(SPELL_SPIKE_GROWTH);
effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eWeb, eDur);
eLink = EffectLinkEffects(eLink, eVMHamper);
eLink = EffectLinkEffects(eLink, eVMEntagle);
eLink = EffectLinkEffects(eLink, eSpikeGrowth);
int nDuration = CasterLvl;
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, INVOKE_WITCHWOOD_STEP, FALSE));
//Apply VFX impact and immunity effect
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(24), TRUE, -1, CasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}