//:://///////////////////////////////////////////// //:: Howl: Paralysis //:: NW_S1_HowlParal //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* A howl emanates from the creature which affects all within 10ft unless they make a save. */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: May 14, 2000 //::////////////////////////////////////////////// #include "NW_I0_SPELLS" void snivhowl () { //Declare major variables effect eHowl = EffectParalyze(); effect eDur = EffectVisualEffect(VFX_IMP_HEAD_COLD); effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_WAR_CRY_FEMALE); effect eLink = EffectLinkEffects(eHowl, eDur); eLink = EffectLinkEffects(eLink, eDur2); float fDelay; int nHD = 10; int nDC = 14; int nDuration = 2; ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF); //Get first target in spell area object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); while(GetIsObjectValid(oTarget)) { if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != OBJECT_SELF) { fDelay = GetDistanceToObject(oTarget)/10; nDuration = GetScaledDuration(nDuration , oTarget); //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_PARALYSIS)); //Make a saving throw check if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) { //Apply the VFX impact and effects DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); FloatingTextStringOnCreature("Hit by a psionic blast",oTarget); } } //Get next target in spell area oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); } } void main() { if (GetStringLeft(GetTag(OBJECT_SELF),7)=="jw_sniv") { snivhowl(); return; } //Declare major variables effect eHowl = EffectParalyze(); effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); effect eDur2 = EffectVisualEffect(VFX_DUR_PARALYZE_HOLD); effect eImpact = EffectVisualEffect(VFX_FNF_HOWL_ODD); effect eLink = EffectLinkEffects(eHowl, eDur); eLink = EffectLinkEffects(eLink, eDur2); float fDelay; int nHD = GetHitDice(OBJECT_SELF); int nDC = 10 + (nHD/4); int nDuration = 1 + (nHD/4); ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF); //Get first target in spell area object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); while(GetIsObjectValid(oTarget)) { if(!GetIsReactionTypeFriendly(oTarget) && !GetIsFriend(oTarget) && oTarget != OBJECT_SELF) { fDelay = GetDistanceToObject(oTarget)/10; nDuration = GetScaledDuration(nDuration , oTarget); //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_HOWL_PARALYSIS)); //Make a saving throw check if(!MySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay)) { //Apply the VFX impact and effects DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration))); } } //Get next target in spell area oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); } }