RoT2_PRC8/_module/nss/2_explode_death.nss
Jaysyn904 499aba4eb3 Initial upload
Initial upload
2023-09-25 18:13:22 -04:00

23 lines
905 B
Plaintext

//Script: cal_explode
//Author: Albert Shih (Calidarien)
//Version: v1.0, 2002-06-25
//Usage: Caller explodes after a delay and damages nearby objects for 2d6 fire
// damage (Reflex save DC 15)
//Notes:
// v1.0: Release version
void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 35, float fRadius = 6.) {
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_FIREBALL), lTarget);
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
do {
int nDamageAfterSave = GetReflexAdjustedDamage(nDamage, oObject, nSaveDC);
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDamage(nDamageAfterSave, DAMAGE_TYPE_FIRE), oObject);
} while ((oObject = GetNextObjectInShape(SHAPE_SPHERE, fRadius, lTarget)) != OBJECT_INVALID);
}
void main()
{
location lSource = GetLocation(OBJECT_SELF);
DelayCommand(1., ExplodeAtLocation(lSource, d6(20)));
}