//:://///////////////////////////////////////////// //:: Entangle //:: NW_S0_EntangleC.NSS //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Upon entering the AOE the target must make a reflex save or be entangled by vegitation */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: July 30, 2001 //::////////////////////////////////////////////// //::Updated Aug 14, 2003 Georg: removed some artifacts //:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff #include "prc_inc_spells" #include "prc_add_spell_dc" void main() { DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_TRANSMUTATION); //Declare major variables effect eHold = EffectEntangle(); effect eEntangle = EffectVisualEffect(VFX_DUR_ENTANGLE); //Link Entangle and Hold effects effect eLink = EffectLinkEffects(eHold, eEntangle); object aoeCreator = GetAreaOfEffectCreator(); int CasterLvl = GetLocalInt(OBJECT_SELF, "X2_AoE_Caster_Level"); int nPenetr = SPGetPenetrAOE(aoeCreator,CasterLvl); object oTarget = GetFirstInPersistentObject(); while(GetIsObjectValid(oTarget)) { // SpawnScriptDebugger(); if(!GetHasFeat(FEAT_WOODLAND_STRIDE, oTarget) && !GetCreatureFlag(oTarget, CREATURE_VAR_IS_INCORPOREAL)) { if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, aoeCreator)) { //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ENTANGLE)); //Make SR check if(!GetHasSpellEffect(SPELL_ENTANGLE, oTarget)) { //if(!PRCDoResistSpell(aoeCreator, oTarget,nPenetr)) //{ //Make reflex save if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, (PRCGetSaveDC(oTarget,aoeCreator)))) { //Apply linked effects SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2),FALSE); } //} } } } //Get next target in the AOE oTarget = GetNextInPersistentObject(); } DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); // Getting rid of the local integer storing the spellschool name }