LoT_PRC8/_module/nss/trap_splsh_avg.nss
Jaysyn904 ec287507a1 Initial upload
Initial upload.
2023-09-25 21:32:17 -04:00

43 lines
1.4 KiB
Plaintext

void CreateObject2(int nObjectType, string sTemplate, location lLocation, int bUseAppearAnimation=FALSE);
//::///////////////////////////////////////////////
//:: Average Acid Splash Trap
//:: NW_T1_SplshAvgC
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Strikes the entering object with a blast of
cold for 3d8 damage. Reflex save to take
1/2 damage.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Nov 16th , 2001
//:://////////////////////////////////////////////
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
object oTarget = GetEnteringObject();
int nDamage = d8(3);
effect eDam;
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
nDamage = GetReflexAdjustedDamage(nDamage, oTarget, 14, SAVING_THROW_TYPE_ACID);
eDam = EffectDamage(nDamage, DAMAGE_TYPE_ACID);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
//respawn trap
//respawn trap
DelayCommand(598.0, CreateObject2(GetObjectType(OBJECT_SELF), GetResRef(OBJECT_SELF), GetLocation(OBJECT_SELF)));
DelayCommand(600.0, DestroyObject(OBJECT_SELF));
}
void CreateObject2(int nObjectType, string sTemplate, location lLocation, int bUseAppearAnimation=FALSE)
{
CreateObject(nObjectType, sTemplate, lLocation, bUseAppearAnimation);
return;
}