Alangara_PRC8/_module/nss/ke_boom_ear_acid.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

30 lines
1013 B
Plaintext

#include "prc_inc_spells"
void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 30, float fRadius = 8.)
{
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DUST_EXPLOSION), lTarget);
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_ACID_S), lTarget);
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
do {
int nDamageAfterSave = PRCGetReflexAdjustedDamage(nDamage/2, oObject, nSaveDC)+nDamage/2;
ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_BLUDGEONING), oObject);
ApplyEffectToObject( DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_ACID), oObject);
}
while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget)) != OBJECT_INVALID);
}
void main()
{
ExecuteScript("mn_lootandxp",OBJECT_SELF);
location lSource = GetLocation(OBJECT_SELF);
DelayCommand(4., ExplodeAtLocation(lSource, d10(5)));
}