home *** CD-ROM | disk | FTP | other *** search
/ PC Zone 125 / DPPCZ0203B.7z / DPPCZ0203B.ISO / Demos / Neverwinter / data1.cab / override / nw_s1_pulsdeath.nss < prev    next >
Text File  |  2002-09-10  |  2KB  |  53 lines

  1. //::///////////////////////////////////////////////
  2. //:: Pulse: Death
  3. //:: NW_S1_PulsDeath
  4. //:: Copyright (c) 2001 Bioware Corp.
  5. //:://////////////////////////////////////////////
  6. /*
  7.     A wave of energy emanates from the creature which affects
  8.     all within 10ft.  Damage can be reduced by half for all
  9.     damaging variants.
  10. */
  11. //:://////////////////////////////////////////////
  12. //:: Created By: Preston Watamaniuk
  13. //:: Created On: May 14, 2000
  14. //:://////////////////////////////////////////////
  15. #include "NW_I0_SPELLS"
  16.  
  17. void main()
  18. {
  19.     //Declare major variables
  20.     effect eVis = EffectVisualEffect(VFX_IMP_DEATH);
  21.     effect eHowl = EffectDeath();
  22.     float fDelay;
  23.     int nHD = GetHitDice(OBJECT_SELF);
  24.     int nDC = 10 + nHD;
  25.     effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
  26.     ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, OBJECT_SELF);
  27.     //Get first target in spell area
  28.     object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
  29.     while(GetIsObjectValid(oTarget))
  30.     {
  31.         if(!GetIsReactionTypeFriendly(oTarget))
  32.         {
  33.             if(oTarget != OBJECT_SELF)
  34.             {
  35.                 //Fire cast spell at event for the specified target
  36.                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_PULSE_DEATH));
  37.                 //Determine effect delay
  38.                 fDelay = GetDistanceBetween(OBJECT_SELF, oTarget)/20;
  39.                 if(!/*FortSave*/MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_DEATH, OBJECT_SELF, fDelay))
  40.                 {
  41.                     //Apply the VFX impact and effects
  42.                     DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eHowl, oTarget));
  43.                     //DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
  44.                 }
  45.             }
  46.         }
  47.         //Get next target in spell area
  48.         oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
  49.     }
  50. }
  51.  
  52.  
  53.