Further file organization
Further file organization
This commit is contained in:
31
nwn/nwnprc/trunk/newspellbook/inv_serptongue.nss
Normal file
31
nwn/nwnprc/trunk/newspellbook/inv_serptongue.nss
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
#include "prc_inc_spells"
|
||||
#include "inv_inc_invfunc"
|
||||
#include "inv_invokehook"
|
||||
|
||||
void main()
|
||||
{
|
||||
|
||||
if (!PreInvocationCastCode())
|
||||
{
|
||||
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Declare major variables
|
||||
int CasterLvl = GetInvokerLevel(OBJECT_SELF, GetInvokingClass());
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_MAGBLUE );
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, 5, SAVING_THROW_TYPE_POISON);
|
||||
effect eLink = EffectLinkEffects(eSave, eDur);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, INVOKE_SERPENTS_TONGUE, FALSE));
|
||||
|
||||
//Apply the VFX impact and effect
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(24),TRUE,-1,CasterLvl);
|
||||
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
|
||||
}
|
Reference in New Issue
Block a user