Files
PRC8/nwn/nwnprc/trunk/spells/nw_s1_howldoom.nss
Jaysyn904 48ca4b8acf 2026/01/21 Update
Swapped Disciple of Asmodeus' Summon Glabrezu for Summon Pit Fiend.  Glabrezu aren't devils.
Wisplings can qualify for Warsling Sniper.
Added Maeluth planetouched racialtype.
Maeluth can qualify for Dwarven Defender. Ollam and Ironsoul Forgemaster.
Added Mechanatrix planetouched racialtype.
Updated creature aura scripts to use PRCEffectDamage(), SPApplyEffectToObject() & PRCMySavingThrow().
2026-01-21 16:35:43 -05:00

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, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)));
}
}
//Get next target in spell area
oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF));
}
}