Added "Removed Files" folder
Added "Removed Files" folder in case we needed to review any of them.
This commit is contained in:
76
_module/_removed files/nw_s0_splresis.nss
Normal file
76
_module/_removed files/nw_s0_splresis.nss
Normal file
@@ -0,0 +1,76 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Spell Resistance
|
||||
//:: NW_S0_SplResis
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
The target creature gains 12 + Caster Level SR.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: March 19, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Last Updated By: Preston Watamaniuk, On: April 11, 2001
|
||||
//:: VFX Pass By: Preston W, On: June 25, 2001
|
||||
|
||||
#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
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
int nLevel = GetCasterLevel(OBJECT_SELF);
|
||||
|
||||
//Epic Spell Resistance Added
|
||||
int nDC;
|
||||
int nAdjs;
|
||||
nAdjs = GetCasterLevel(OBJECT_SELF) - 20;
|
||||
if(GetCasterLevel(OBJECT_SELF)>=23)
|
||||
{
|
||||
nDC = nAdjs/3;
|
||||
SendMessageToPC(OBJECT_SELF, "Your Epic Spell Resistance Bonus = + " + IntToString(nDC) + " DC");
|
||||
}
|
||||
else if(GetCasterLevel(OBJECT_SELF) <=22)
|
||||
{
|
||||
nDC = 0;
|
||||
}
|
||||
|
||||
//Epic Resistance Added
|
||||
int nBonus = 12 + nLevel + nDC;
|
||||
effect eSR = EffectSpellResistanceIncrease(nBonus);
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_MAGIC_PROTECTION);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eDur2 = EffectVisualEffect(249);
|
||||
effect eLink = EffectLinkEffects(eSR, eDur);
|
||||
eLink = EffectLinkEffects(eLink, eDur2);
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_SPELL_RESISTANCE, FALSE));
|
||||
//Check for metamagic extension
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nLevel = nLevel *2; //Duration is +100%
|
||||
}
|
||||
//Apply VFX impact and SR bonus effect
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nLevel));
|
||||
}
|
Reference in New Issue
Block a user