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

  1. //::///////////////////////////////////////////////
  2. //:: Web: Heartbeat
  3. //:: NW_S0_WebC.nss
  4. //:: Copyright (c) 2001 Bioware Corp.
  5. //:://////////////////////////////////////////////
  6. /*
  7.     Creates a mass of sticky webs that cling to
  8.     and entangle targets who fail a Reflex Save
  9.     Those caught can make a new save every
  10.     round.  Movement in the web is 1/5 normal.
  11.     The higher the creatures Strength the faster
  12.     they move within the web.
  13. */
  14. //:://////////////////////////////////////////////
  15. //:: Created By: Preston Watamaniuk
  16. //:: Created On: Aug 8, 2001
  17. //:://////////////////////////////////////////////
  18.  
  19. #include "NW_I0_SPELLS"    
  20. void main()
  21. {
  22.     //Declare major variables
  23.     effect eWeb = EffectEntangle();
  24.     effect eVis = EffectVisualEffect(VFX_DUR_WEB);
  25.     object oTarget;
  26.     //Spell resistance check
  27.     oTarget = GetFirstInPersistentObject();
  28.     while(GetIsObjectValid(oTarget))
  29.     {
  30.         if(!GetHasFeat(FEAT_WOODLAND_STRIDE, oTarget))
  31.         {
  32.             if(!GetIsReactionTypeFriendly(oTarget, GetAreaOfEffectCreator()))
  33.             {
  34.             // *************
  35.             // * Patch Fix
  36.             // * Brent
  37.             // * Moved the two spell cast events down after the reaction check check
  38.                 //Fire cast spell at event for the target
  39.                 SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_WEB));
  40.                 //Fire cast spell at event for the specified target
  41.                 SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WEB));
  42.  
  43.                 if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget))
  44.                 {
  45.                     //Make a Fortitude Save to avoid the effects of the entangle.
  46.                     if(!/*Reflex Save*/ MySavingThrow(SAVING_THROW_REFLEX, oTarget, GetSpellSaveDC()))
  47.                     {
  48.                         //Entangle effect and Web VFX impact
  49.                         ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eWeb, oTarget, RoundsToSeconds(1));
  50.                         ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, RoundsToSeconds(1));
  51.                     }
  52.                 }
  53.             }
  54.         }
  55.         oTarget = GetNextInPersistentObject();
  56.     }
  57. }
  58.