//:://///////////////////////////////////////////// //:: Mass Camoflage //:: x0_s0_masscamo.nss //:: Copyright (c) 2002 Bioware Corp. //::////////////////////////////////////////////// /* +10 hide bonus to all allies in area */ //::////////////////////////////////////////////// //:: Created By: Brent Knowles //:: Created On: July 24, 2002 //::////////////////////////////////////////////// //:: VFX Pass By: #include "X0_I0_SPELLS" #include "x2_inc_spellhook" void main() { /* 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 effect eVis = EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD); int nDuration = GetCasterLevel(OBJECT_SELF); int nMetaMagic = GetMetaMagicFeat(); object oTarget = GetSpellTargetObject(); effect eShield = EffectDamageShield(nDuration, DAMAGE_BONUS_2d10, DAMAGE_TYPE_FIRE); effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); effect eCold = EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD, 10); effect eFire = EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 10); //Link effects effect eLink = EffectLinkEffects(eShield, eCold); eLink = EffectLinkEffects(eLink, eFire); eLink = EffectLinkEffects(eLink, eDur); eLink = EffectLinkEffects(eLink, eVis); //Fire cast spell at event for the specified target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_ELEMENTAL_SHIELD, FALSE)); // *GZ: No longer stack this spell if (GetHasSpellEffect(GetSpellId(),oTarget)) { RemoveSpellEffects(GetSpellId(), OBJECT_SELF, oTarget); } //Enter Metamagic conditions if (nMetaMagic == METAMAGIC_EXTEND) { nDuration = nDuration *2; //Duration is +100% } //Apply the VFX impact and effects ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration)); }