PoA_PRC8/_module/_removed files/nw_s0_crundead.nss
Jaysyn904 151d074880 Added "Removed Files" folder
Added "Removed Files" folder in case we needed to review any of them.
2022-10-10 10:39:34 -04:00

72 lines
2.0 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Create Undead
//:: NW_S0_CrUndead.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Spell summons a Ghoul, Shadow, Ghast, Wight or
Wraith
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: April 12, 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
int nMetaMagic = GetMetaMagicFeat();
int nCasterLevel = GetCasterLevel(OBJECT_SELF);
int nDuration = nCasterLevel;
nDuration = 24;
effect eSummon;
//effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
//Check for metamagic extend
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
//Set the summoned undead to the appropriate template based on the caster level
if (nCasterLevel <= 13)
{
eSummon = EffectSummonCreature("doomknight01",VFX_FNF_SUMMON_UNDEAD);
}
else if ((nCasterLevel >= 14) && (nCasterLevel <= 18))
{
eSummon = EffectSummonCreature("vampire01",VFX_FNF_SUMMON_UNDEAD);
}
else if ((nCasterLevel >= 19) && (nCasterLevel <= 25))
{
eSummon = EffectSummonCreature("lichlord01",VFX_FNF_SUMMON_UNDEAD); // change later
}
else if ((nCasterLevel >= 26))
{
eSummon = EffectSummonCreature("demilich01",VFX_FNF_SUMMON_UNDEAD);
}
//Apply VFX impact and summon effect
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eSummon, GetSpellTargetLocation(), HoursToSeconds(nDuration));
//ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, GetSpellTargetLocation());
}