RATDOG/_module/nss/bleakaura1.nss
Jaysyn904 df709d33fc Horsefly Swamp update
Creatures & encounter tables to support Horsefly swamp expansion.
2023-08-13 17:21:44 -04:00

36 lines
1.1 KiB
Plaintext

#include "NW_I0_SPELLS"
#include "prc_inc_spells"
void main()
{
//Declare major variables
object oCaster = GetAreaOfEffectCreator();
effect eVis = EffectVisualEffect(VFX_IMP_FROST_S);
effect eVis3 = EffectVisualEffect(VFX_IMP_HEALING_S);
effect eHeal = EffectHeal(10);
object oTarget = GetEnteringObject();
if(GetIsEnemy(oTarget, oCaster))
{
int nDam;
if ( PRCMySavingThrow(SAVING_THROW_FORT, oTarget, 16, SAVING_THROW_TYPE_COLD, oCaster) )
nDam = d6();
else
nDam = d6(2);
if ( nDam > 0 )
{
effect eDam = EffectDamage(nDam,DAMAGE_TYPE_COLD);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eDam,oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
int nFlag = GetLocalInt(oCaster,"AURA_STATE");
if ( nFlag == 0 )
{
SetLocalInt(oCaster,"AURA_STATE",1);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis3,oCaster);
ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oCaster);
}
}
}
}