Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
60
_removed/nw_s0_splresis.nss
Normal file
60
_removed/nw_s0_splresis.nss
Normal file
@@ -0,0 +1,60 @@
|
||||
///::///////////////////////////////////////////////
|
||||
//:: 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);
|
||||
int nBonus = 12 + nLevel;
|
||||
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