//:://///////////////////////////////////////////// //:: Epic Ward //:: X2_S2_EpicWard. //:: Copyright (c) 2003 Bioware Corp. //::////////////////////////////////////////////// /* Makes the caster invulnerable to damage (equals damage reduction 50/+20) Lasts 1 round per level */ //::////////////////////////////////////////////// //:: Created By: Georg Zoeller //:: Created On: Aug 12, 2003 //::////////////////////////////////////////////// //:: modified by mr_bumpkin Dec 15, 2003 for PRC stuff #include "prc_inc_spells" void main() { DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ABJURATION); /* Spellcast Hook Code Added 2003-06-23 by GeorgZ If you want to make changes to all spells, check x2_inc_spellhook.nss to find out more */ if (!X2PreSpellCastCode()) { // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell return; } // End of Spell Cast Hook //Declare major variables object oTarget = PRCGetSpellTargetObject(); int nDuration = PRCGetCasterLevel(OBJECT_SELF); //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE)); int nLimit = 50*nDuration; effect eDur = EffectVisualEffect(495); effect eProt = EffectDamageReduction(50, DAMAGE_POWER_PLUS_TWENTY, nLimit); effect eLink = EffectLinkEffects(eDur, eProt); eLink = EffectLinkEffects(eLink, eDur); // * Brent, Nov 24, making extraodinary so cannot be dispelled eLink = ExtraordinaryEffect(eLink); PRCRemoveEffectsFromSpell(OBJECT_SELF, GetSpellId()); //Apply the armor bonuses and the VFX impact ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration)); DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); // Getting rid of the local integer storing the spellschool name }