Alangara_PRC8/_module/nss/assassinpower1.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

79 lines
2.1 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Ghostly Visage
//:: NW_S0_MirrImage.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Caster gains 5/+1 Damage reduction and immunity
to 1st level spells.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Jan 7, 2001
//:://////////////////////////////////////////////
#include "x2_inc_spellhook"
#include "prc_inc_spells"
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
int nHP;
nHP = 2;
//Declare major variables
//object oTarget = GetSpellTargetObject();
object oTarget = GetItemActivator();
effect eVis = EffectVisualEffect(VFX_DUR_AURA_BLUE_LIGHT);
effect eDam = EffectDamageReduction(10, DAMAGE_POWER_PLUS_TEN);
effect eSpell = EffectSpellLevelAbsorption(1);
effect eConceal = EffectConcealment(25);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eRegen = EffectRegenerate(nHP,6.0);
effect eLink = EffectLinkEffects(eDam, eVis);
eLink = EffectLinkEffects(eLink, eSpell);
eLink = EffectLinkEffects(eLink, eConceal);
eLink = EffectLinkEffects(eLink, eDur);
eLink = EffectLinkEffects(eLink, eRegen);
int nMetaMagic = PRCGetMetaMagicFeat();
//int nDuration = GetCasterLevel(OBJECT_SELF);
int nDuration = GetLevelByClass(CLASS_TYPE_ASSASSIN, oTarget);
nDuration = nDuration +2;
//Fire cast spell at event for the specified target
// SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_GHOSTLY_VISAGE, FALSE));
//Enter Metamagic conditions
//if (nMetaMagic == METAMAGIC_EXTEND)
//{
// nDuration = nDuration *2; //Duration is +100%
//}
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration));
}