home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Zone 125
/
DPPCZ0203B.7z
/
DPPCZ0203B.ISO
/
Demos
/
Neverwinter
/
data1.cab
/
override
/
nw_s1_pulslvldr.nss
< prev
next >
Wrap
Text File
|
2002-09-10
|
2KB
|
51 lines
//::///////////////////////////////////////////////
//:: Pulse: Level Drain
//:: NW_S1_PulsLvlDr
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
A wave of energy emanates from the creature which affects
all within 10ft. Damage can be reduced by half for all
damaging variants.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 14, 2000
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
effect eHowl;
float fDelay;
int nHD = GetHitDice(OBJECT_SELF);
int nDC = 10 + nHD;
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetLocation(OBJECT_SELF));
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
//Get first target in spell area
while(GetIsObjectValid(oTarget))
{
if(oTarget != OBJECT_SELF)
{
if(!GetIsReactionTypeFriendly(oTarget))
{
fDelay = GetSpellEffectDelay(GetLocation(OBJECT_SELF), oTarget)/20;
//Make a saving throw check
if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, OBJECT_SELF, fDelay))
{
//Apply the VFX impact and effects
eHowl = EffectNegativeLevel(1);
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
}
}
//Get next target in spell area
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
}
}