Updated Release Archive. Fixed Mage-killer prereqs. Removed old LETO & ConvoCC related files. Added organized spell scroll store. Fixed Gloura spellbook. Various TLK fixes. Reorganized Repo. Removed invalid user folders. Added DocGen back in.
71 lines
2.2 KiB
Plaintext
71 lines
2.2 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
|
|
//:://////////////////////////////////////////////
|
|
|
|
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
|
#include "prc_inc_spells"
|
|
|
|
|
|
|
|
void main()
|
|
{
|
|
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
|
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_ILLUSION);
|
|
/*
|
|
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 = PRCGetSpellTargetObject();
|
|
effect eVis = EffectVisualEffect(VFX_DUR_GHOSTLY_VISAGE);
|
|
effect eDam = EffectDamageReduction(5, DAMAGE_POWER_PLUS_ONE);
|
|
effect eSpell = EffectSpellLevelAbsorption(1);
|
|
effect eConceal = EffectConcealment(10);
|
|
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
|
effect eLink = EffectLinkEffects(eDam, eVis);
|
|
eLink = EffectLinkEffects(eLink, eSpell);
|
|
eLink = EffectLinkEffects(eLink, eConceal);
|
|
eLink = EffectLinkEffects(eLink, eDur);
|
|
int nMetaMagic = PRCGetMetaMagicFeat();
|
|
int CasterLvl = PRCGetCasterLevel(OBJECT_SELF);
|
|
int nDuration = CasterLvl;
|
|
//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
|
|
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, TurnsToSeconds(nDuration),TRUE,-1,CasterLvl);
|
|
|
|
|
|
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
|
// Getting rid of the local integer storing the spellschool name
|
|
}
|
|
|