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

  1. //::///////////////////////////////////////////////
  2. //:: Wall of Fire: Heartbeat
  3. //:: NW_S0_WallFireA.nss
  4. //:: Copyright (c) 2001 Bioware Corp.
  5. //:://////////////////////////////////////////////
  6. /*
  7.     Person within the AoE take 4d6 fire damage
  8.     per round.
  9. */
  10. //:://////////////////////////////////////////////
  11. //:: Created By: Preston Watamaniuk
  12. //:: Created On: May 17, 2001
  13. //:://////////////////////////////////////////////
  14.  
  15. #include "NW_I0_SPELLS"    
  16. void main()
  17. {
  18.     //Declare major variables
  19.     int nMetaMagic = GetMetaMagicFeat();
  20.     int nDamage;
  21.     effect eDam;
  22.     object oTarget;
  23.     //Declare and assign personal impact visual effect.
  24.     effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
  25.     //Capture the first target object in the shape.
  26.     oTarget = GetFirstInPersistentObject();
  27.     //Declare the spell shape, size and the location.
  28.     while(GetIsObjectValid(oTarget))
  29.     {
  30.         if(!GetIsReactionTypeFriendly(oTarget, GetAreaOfEffectCreator()))
  31.         {
  32.             //Fire cast spell at event for the specified target
  33.             SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE));
  34.             //Make SR check, and appropriate saving throw(s).
  35.             if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget))
  36.             {
  37.                 //Roll damage.
  38.                 nDamage = d6(4);
  39.                 //Enter Metamagic conditions
  40.                 if (nMetaMagic == METAMAGIC_MAXIMIZE)
  41.                 {
  42.                    nDamage = 24;//Damage is at max
  43.                 }
  44.                 if (nMetaMagic == METAMAGIC_EMPOWER)
  45.                 {
  46.                      nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
  47.                 }
  48.                 nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE);
  49.                 if(nDamage > 0)
  50.                 {
  51.                     // Apply effects to the currently selected target.
  52.                     eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
  53.                     ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
  54.                     ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVis, oTarget, 1.0);
  55.                 }
  56.             }
  57.         }
  58.         //Select the next target within the spell shape.
  59.         oTarget = GetNextInPersistentObject();
  60.     }
  61. }
  62.