Updated Release Archive. Fixed Mage-killer prereqs. Removed old LETO & ConvoCC related files. Added organized spell scroll store. Fixed Gloura spellbook. Various TLK fixes. Reorganized Repo. Removed invalid user folders. Added DocGen back in.
49 lines
1.9 KiB
Plaintext
49 lines
1.9 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: 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));
|
|
}
|
|
}
|