Initial upload
Initial upload
This commit is contained in:
58
_module/nss/__nw_s0_fireshld.nss
Normal file
58
_module/nss/__nw_s0_fireshld.nss
Normal file
@@ -0,0 +1,58 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Elemental Shield
|
||||
//:: NW_S0_FireShld.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Caster gains 50% cold and fire immunity. Also anyone
|
||||
who strikes the caster with melee attacks takes
|
||||
1d6 + 1 per caster level in damage.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Jan 7, 2002
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
/*
|
||||
bugfix by Grant Beaty 2002.08.31
|
||||
- could stack
|
||||
*/
|
||||
|
||||
#include "NW_I0_SPELLS"
|
||||
void main()
|
||||
{
|
||||
//Declare major variables
|
||||
effect eVis = EffectVisualEffect(VFX_DUR_ELEMENTAL_SHIELD);
|
||||
int nDuration = GetCasterLevel(OBJECT_SELF);
|
||||
int nMetaMagic = GetMetaMagicFeat();
|
||||
object oTarget = OBJECT_SELF;
|
||||
effect eShield = EffectRegenerate(3, 6.0);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
effect eCold = EffectDamageImmunityIncrease(DAMAGE_TYPE_COLD, 50);
|
||||
effect eFire = EffectDamageImmunityIncrease(DAMAGE_TYPE_FIRE, 50);
|
||||
|
||||
//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));
|
||||
|
||||
//Enter Metamagic conditions
|
||||
if (nMetaMagic == METAMAGIC_EXTEND)
|
||||
{
|
||||
nDuration = nDuration *2; //Duration is +100%
|
||||
}
|
||||
|
||||
//If there is already a fire shield in effect, remove it.
|
||||
if(GetHasSpellEffect(GetSpellId(), oTarget))
|
||||
RemoveSpellEffects(GetSpellId(), oTarget, oTarget);
|
||||
|
||||
//Apply the VFX impact and effects
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nDuration));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user