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

  1. //::///////////////////////////////////////////////
  2. //:: Wall of Fire: On Enter
  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 = GetEnteringObject();
  27.     if(!GetIsReactionTypeFriendly(oTarget, GetAreaOfEffectCreator()))
  28.     {
  29.         //Fire cast spell at event for the specified target
  30.         SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE));
  31.         //Make SR check, and appropriate saving throw(s).
  32.         if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget))
  33.         {
  34.             //Roll damage.
  35.             nDamage = d6(4);
  36.             //Enter Metamagic conditions
  37.                 if (nMetaMagic == METAMAGIC_MAXIMIZE)
  38.                 {
  39.                    nDamage = 24;//Damage is at max
  40.                 }
  41.                 if (nMetaMagic == METAMAGIC_EMPOWER)
  42.                 {
  43.                      nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
  44.                 }
  45.             nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE);
  46.             if(nDamage > 0)
  47.             {
  48.                 // Apply effects to the currently selected target.
  49.                 eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
  50.                 ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
  51.                 ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
  52.             }
  53.         }
  54.     }
  55. }
  56.