Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
48
trunk/spells/nw_s1_howldoom.nss
Normal file
48
trunk/spells/nw_s1_howldoom.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Howl of Doom
|
||||
//:: NW_S1_HowlDoom
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
All those that fail the save are struck with the
|
||||
doom effect
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 8, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
// Modified 2004/01/30 (Brian Greinke)
|
||||
// Removed resistance check (giving false negative)
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
int nHD = GetHitDice(OBJECT_SELF);
|
||||
int nDC = 10 + (nHD/4);
|
||||
int nDuration = 1 + (nHD/4);
|
||||
effect eLink = EffectShaken();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DOOM);
|
||||
effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_ODD);
|
||||
float fDelay;
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
|
||||
object oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
//Get first target in spell area
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != OBJECT_SELF)
|
||||
{
|
||||
fDelay = GetDistanceToObject(oTarget)/10;
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_DOOM));
|
||||
if( !PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC))
|
||||
{
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)));
|
||||
}
|
||||
}
|
||||
//Get next target in spell area
|
||||
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user