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

55 lines
1.8 KiB
Plaintext

void CreateObject2(int nObjectType, string sTemplate, location lLocation, int bUseAppearAnimation=FALSE);
//::///////////////////////////////////////////////
//:: Strong Holy Trap
//:: NW_T1_HolyStrC
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Strikes the entering undead with a dose of holy
water for 8d10 damage.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: July 4th, 2001
//:://////////////////////////////////////////////
#include "prc_inc_racial"
void main()
{
//Declare major variables
object oTarget = GetEnteringObject();
int nAC = GetAC(oTarget);
//Make attack roll
int nRoll = d20() + 10 + 6;
effect eDam = EffectDamage(d10(8), DAMAGE_TYPE_DIVINE);
effect eVis = EffectVisualEffect(VFX_IMP_SUNSTRIKE);
if (nRoll > 0)
{
if (MyPRCGetRacialType(oTarget) == RACIAL_TYPE_UNDEAD)
{
//Apply Holy Damage
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
else
{
eDam = EffectDamage(d4(6), DAMAGE_TYPE_DIVINE);
//Apply Holy Damage
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
//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;
}