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 >
Wrap
Text File
|
2002-09-10
|
2KB
|
56 lines
//::///////////////////////////////////////////////
//:: Wall of Fire: On Enter
//:: NW_S0_WallFireA.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Person within the AoE take 4d6 fire damage
per round.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 17, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
int nMetaMagic = GetMetaMagicFeat();
int nDamage;
effect eDam;
object oTarget;
//Declare and assign personal impact visual effect.
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
//Capture the first target object in the shape.
oTarget = GetEnteringObject();
if(!GetIsReactionTypeFriendly(oTarget, GetAreaOfEffectCreator()))
{
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_WALL_OF_FIRE));
//Make SR check, and appropriate saving throw(s).
if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget))
{
//Roll damage.
nDamage = d6(4);
//Enter Metamagic conditions
if (nMetaMagic == METAMAGIC_MAXIMIZE)
{
nDamage = 24;//Damage is at max
}
if (nMetaMagic == METAMAGIC_EMPOWER)
{
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
}
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_FIRE);
if(nDamage > 0)
{
// Apply effects to the currently selected target.
eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}
}