Battledale_PRC8/_removed/nw_s0_mindfog.nss
Jaysyn904 7b9e44ebbb Initial upload
Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
2024-03-11 23:44:08 -04:00

55 lines
1.5 KiB
Plaintext

///::///////////////////////////////////////////////
//:: Mind Fog
//:: NW_S0_MindFog.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creates a bank of fog that lowers the Will save
of all creatures within who fail a Will Save by
-10. Affect lasts for 2d6 rounds after leaving
the fog
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Aug 1, 2001
//:://////////////////////////////////////////////
#include "x2_inc_spellhook"
void main()
{
/*
Spellcast Hook Code
Added 2003-06-20 by Georg
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 including Area of Effect Object
effect eAOE = EffectAreaOfEffect(AOE_PER_FOGMIND);
location lTarget = GetSpellTargetLocation();
int nDuration = 2 + GetCasterLevel(OBJECT_SELF) / 2;
effect eImpact = EffectVisualEffect(262);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eImpact, lTarget);
int nMetaMagic = GetMetaMagicFeat();
//Check Extend metamagic feat.
if (nMetaMagic == METAMAGIC_EXTEND)
{
nDuration = nDuration *2; //Duration is +100%
}
//Create an instance of the AOE Object using the Apply Effect function
ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY, eAOE, lTarget, RoundsToSeconds(nDuration));
}