//::////////////////////////////////////////////// //:: DEADLY Frost Trap ::// //::////////////////////////////////////////////// //:: NEW FROST TRAP DESIGN BY TARASHON ::// //::////////////////////////////////////////////// #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_FROST_L); effect eParal = EffectPetrify(); effect eFreeze = EffectVisualEffect(VFX_DUR_BLUR); effect eLink = EffectLinkEffects(eParal, eFreeze); effect eDam; // *** DC for saves *** // 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 = d4(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_COLD); if(!MySavingThrow(SAVING_THROW_FORT, oTarget, 40, SAVING_THROW_TYPE_TRAP)) { ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(10)); } //Apply effects to the target. eDam = EffectDamage(nDamage, DAMAGE_TYPE_COLD); 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); } }