ES_PRC8/_module/nss/cal_disease.nss
Jaysyn904 563ab3e88f Renamed NWNxEE includes for PRC compatibility
Renamed NWNxEE includes for PRC compatibility.
2023-11-14 14:51:00 -05:00

29 lines
1.2 KiB
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
// tdh - altered this for disease instead of fire
void ExplodeAtLocation(location lTarget, int nDamage, int nSaveDC = 30, float fRadius = 3.) {
ApplyEffectAtLocation( DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_GAS_EXPLOSION_EVIL), lTarget);
object oObject = GetFirstObjectInShape(SHAPE_SPHERE, fRadius, lTarget);
do {
// if (FortitudeSave(oObject, nSaveDC, SAVING_THROW_TYPE_DISEASE, OBJECT_SELF)==0) {
ApplyEffectToObject( DURATION_TYPE_PERMANENT, EffectDisease(DISEASE_ZOMBIE_CREEP), oObject);
// }
// 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(3., ExplodeAtLocation(lSource, d10(2)));
}