home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Zone 125
/
DPPCZ0203B.7z
/
DPPCZ0203B.ISO
/
Demos
/
Neverwinter
/
data1.cab
/
override
/
nw_s0_acidfogc.nss
< prev
next >
Wrap
Text File
|
2002-09-10
|
2KB
|
63 lines
//::///////////////////////////////////////////////
//:: Acid Fog: Heartbeat
//:: NW_S0_AcidFogC.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
All creatures within the AoE take 2d6 acid damage
per round and upon entering if they fail a Fort Save
their movement is halved.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 17, 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
int nMetaMagic = GetMetaMagicFeat();
int nDamage = d6(2);
effect eDam;
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
object oTarget;
float fDelay;
//Enter Metamagic conditions
if (nMetaMagic == METAMAGIC_MAXIMIZE)
{
nDamage = 12;//Damage is at max
}
if (nMetaMagic == METAMAGIC_EMPOWER)
{
nDamage = nDamage + (nDamage/2); //Damage/Healing is +50%
}
//Set the damage effect
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
//Start cycling through the AOE Object for viable targets including doors and placable objects.
oTarget = GetFirstInPersistentObject(OBJECT_SELF);
while(GetIsObjectValid(oTarget))
{
if(!GetIsReactionTypeFriendly(oTarget, GetAreaOfEffectCreator()))
{
if(!MySavingThrow(SAVING_THROW_FORT, oTarget, GetSpellSaveDC(), SAVING_THROW_TYPE_ACID, GetAreaOfEffectCreator(), fDelay))
{
nDamage = d6();
}
fDelay = GetRandomDelay(0.4, 1.2);
//Fire cast spell at event for the affected target
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_ACID_FOG));
//Spell resistance check
if(!MyResistSpell(GetAreaOfEffectCreator(), oTarget, fDelay))
{
//Apply damage and visuals
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
}
}
//Get next target.
oTarget = GetNextInPersistentObject(OBJECT_SELF);
}
}