PRC8/nwn/nwnprc/trunk/newspellbook/inv_entrpward.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

50 lines
1.5 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Entropic Warding
//:://////////////////////////////////////////////
/*
20% concealment to ranged attacks including
ranged spell attacks
Duration: 1 turn/level
*/
//:://////////////////////////////////////////////
//:: Created By: Brent Knowles
//:: Created On: July 18, 2002
//:://////////////////////////////////////////////
//:: VFX Pass By:
#include "prc_inc_spells"
#include "inv_inc_invfunc"
#include "inv_invokehook"
void main()
{
if (!PreInvocationCastCode())
{
// If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
//Declare major variables
object oTarget = OBJECT_SELF;
int CasterLvl = GetInvokerLevel(OBJECT_SELF, GetInvokingClass());
int nDuration = CasterLvl;
effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, INVOKE_ENTROPIC_WARDING, FALSE));
//Set the four unique armor bonuses
effect eShield = EffectConcealment(20, MISS_CHANCE_TYPE_VS_RANGED);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eShield, eDur);
//Apply the armor bonuses and the VFX impact
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration),TRUE,-1,CasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}