//:://///////////////////////////////////////////// //:: Prayer //:: NW_S0_Prayer.nss //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Allies gain +1 Attack, damage, saves, skill checks Enemies gain -1 to these stats */ //::////////////////////////////////////////////// //:: Created By: Preston Watamaniuk //:: Created On: Oct 25, 2001 //::////////////////////////////////////////////// //:: VFX Pass By: Preston W, On: June 22, 2001 //:: modified by mr_bumpkin Dec 4, 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_CONJURATION); /* Spellcast Hook Code Added 2003-06-20 by Georg 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; effect ePosVis = EffectVisualEffect(VFX_IMP_HOLY_AID); effect eNegVis = EffectVisualEffect(VFX_IMP_DOOM); effect eImpact = EffectVisualEffect(VFX_FNF_LOS_HOLY_30); int nBonus = 1; effect eBonAttack = EffectAttackIncrease(nBonus); effect eBonSave = EffectSavingThrowIncrease(SAVING_THROW_ALL, nBonus); effect eBonDam = EffectDamageIncrease(nBonus, DAMAGE_TYPE_SLASHING); effect eBonSkill = EffectSkillIncrease(SKILL_ALL_SKILLS, nBonus); effect ePosDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE); effect ePosLink = EffectLinkEffects(eBonAttack, eBonSave); ePosLink = EffectLinkEffects(ePosLink, eBonDam); ePosLink = EffectLinkEffects(ePosLink, eBonSkill); ePosLink = EffectLinkEffects(ePosLink, ePosDur); effect eNegAttack = EffectAttackDecrease(nBonus); effect eNegSave = EffectSavingThrowDecrease(SAVING_THROW_ALL, nBonus); effect eNegDam = EffectDamageDecrease(nBonus, DAMAGE_TYPE_BLUDGEONING|DAMAGE_TYPE_PIERCING|DAMAGE_TYPE_SLASHING); effect eNegSkill = EffectSkillDecrease(SKILL_ALL_SKILLS, nBonus); effect eNegDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); effect eNegLink = EffectLinkEffects(eNegAttack, eNegSave); eNegLink = EffectLinkEffects(eNegLink, eNegDam); eNegLink = EffectLinkEffects(eNegLink, eNegSkill); eNegLink = EffectLinkEffects(eNegLink, eNegDur); int CasterLvl = PRCGetCasterLevel(OBJECT_SELF); int nDuration = CasterLvl; int nMetaMagic = PRCGetMetaMagicFeat(); //Metamagic duration check if (CheckMetaMagic(nMetaMagic, METAMAGIC_EXTEND)) { nDuration = nDuration *2; //Duration is +100% } int nPenetr = CasterLvl + SPGetPenetr(); //Apply Impact ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, PRCGetSpellTargetLocation()); //Get the first target in the radius around the caster oTarget = MyFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); while(GetIsObjectValid(oTarget)) { if(GetIsFriend(oTarget)) { //Fire spell cast at event for target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PRAYER, FALSE)); //Apply VFX impact and bonus effects SPApplyEffectToObject(DURATION_TYPE_INSTANT, ePosVis, oTarget); SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, ePosLink, oTarget,RoundsToSeconds(nDuration),TRUE,-1,CasterLvl); } else if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF)) { //Fire spell cast at event for target SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_PRAYER)); if(!PRCDoResistSpell(OBJECT_SELF, oTarget,nPenetr)) { //Apply VFX impact and bonus effects SPApplyEffectToObject(DURATION_TYPE_INSTANT, eNegVis, oTarget); SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eNegLink, oTarget, RoundsToSeconds(nDuration),TRUE,-1,CasterLvl); } } //Get the next target in the specified area around the caster oTarget = MyNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_COLOSSAL, GetLocation(OBJECT_SELF)); } DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR"); // Getting rid of the integer used to hold the spells spell school }