//:://///////////////////////////////////////////// //:: Deadly Fire Trap //:: NW_T1_FireDeadC //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Does 14d6 damage to all within 10 ft. */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: July 4th, 2001 //::////////////////////////////////////////////// //:: Update Pass By: Preston W, On: July 27, 2001 #include "NW_I0_SPELLS" void main() { //Declare major variables int bValid; object oTarget = GetEnteringObject(); location lTarget = GetLocation(oTarget); int nDamage; effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M); effect eDam; int nSaveDC = 40; //Get first object in the target area oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget); //Cycle through the target area until all object have been targeted while(GetIsObjectValid(oTarget)) { if(!GetIsReactionTypeFriendly(oTarget)) { //Roll damage nDamage = d10(80); //Adjust the trap damage based on the feats of the target if(!MySavingThrow(SAVING_THROW_REFLEX, oTarget, nSaveDC, SAVING_THROW_TYPE_TRAP)) { if (GetHasFeat(FEAT_IMPROVED_EVASION, oTarget)) { nDamage /= 2; } } else if (GetHasFeat(FEAT_EVASION, oTarget) || GetHasFeat(FEAT_IMPROVED_EVASION, oTarget)) { nDamage /= 2; // nDamage = 0; } else { nDamage /= 2; } if (nDamage > 0) { //Set damage effect eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); if (nDamage > 0) { //Apply effects to the target. eDam = EffectDamage(nDamage, DAMAGE_TYPE_FIRE); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); DelayCommand(0.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget)); } } } //Get next target in shape oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_HUGE, lTarget); } }