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

57 lines
1.9 KiB
Plaintext

void CreateObject2(int nObjectType, string sTemplate, location lLocation, int bUseAppearAnimation=FALSE);
//::///////////////////////////////////////////////
//:: Average Acid Blob
//:: NW_T1_AcidAvgC
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Target is hit with a blob of acid that does
5d6 Damage and holds the target for 3 rounds.
Can make a Reflex save to avoid the hold effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: July 4th, 2001
//:://////////////////////////////////////////////
#include "prc_inc_spells"
#include "NW_I0_SPELLS"
void main()
{
//Declare major variables
int nDuration = 3;
object oTarget = GetEnteringObject();
effect eDam = EffectDamage(d6(5), DAMAGE_TYPE_ACID);
effect eHold = EffectParalyze();
effect eVis = EffectVisualEffect(VFX_IMP_ACID_S);
effect eDur = EffectVisualEffect(VFX_DUR_PARALYZED);
effect eLink = EffectLinkEffects(eHold, eDur);
int nDamage;
//Make Reflex Save
if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, 20, SAVING_THROW_TYPE_ACID, OBJECT_SELF))
{
//Apply Hold and Damage
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
}
else
{
//Apply Damage
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
//respawn trap
SetIsDestroyable(TRUE);
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;
}