home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Zone 125
/
DPPCZ0203B.7z
/
DPPCZ0203B.ISO
/
Demos
/
Neverwinter
/
data1.cab
/
override
/
nw_s0_slow.nss
< prev
next >
Wrap
Text File
|
2002-09-10
|
3KB
|
64 lines
//::///////////////////////////////////////////////
//:: Slow
//:: NW_S0_Slow.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Character can take only one partial action
per round.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 29, 2001
//:://////////////////////////////////////////////
//:: VFX Pass By: Preston W, On: June 25, 2001
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
object oTarget;
effect eSlow = EffectSlow();
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eSlow, eDur);
effect eVis = EffectVisualEffect(VFX_IMP_SLOW);
effect eImpact = EffectVisualEffect(VFX_FNF_LOS_NORMAL_30);
int nMetaMagic = GetMetaMagicFeat();
//Determine spell duration as an integer for later conversion to Rounds, Turns or Hours.
int nDuration = GetCasterLevel(OBJECT_SELF);
int nLevel = nDuration;
int nCount = 0;
location lSpell = GetSpellTargetLocation();
//Metamagic check for extend
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, GetSpellTargetLocation());
//Declare the spell shape, size and the location. Capture the first target object in the shape.
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lSpell);
//Cycle through the targets within the spell shape until an invalid object is captured or the number of
//targets affected is equal to the caster level.
while(GetIsObjectValid(oTarget) || nCount == nLevel)
{
if(!GetIsFriend(oTarget))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SLOW));
if (!MyResistSpell(OBJECT_SELF, oTarget) && !/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()))
{
//Apply the slow effect and VFX impact
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
//Count the number of creatures affected
nCount++;
}
}
//Select the next target within the spell shape.
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, lSpell);
}
}