Changes to nw_s0_bescurse

:://///////
:: Bestow Curse
:: NW_S0_BesCurse.nss
:: Copyright (c) 2001 Bioware Corp.
:://////////
/*
Afflicted creature must save or suffer a -2 penalty
to all ability scores. This is a supernatural effect.
*/
:://////////
:: Created By: Bob McCabe
:: Created On: March 6, 2001
:://////////
:: Last Updated By: Preston Watamaniuk
:: VFX Pass By: Preston W, On: June 20, 2001
:: Update Pass By: Preston W, On: July 20, 2001
:: AFW-OEI 04/05/2007: Increase curse to -3 to all ability scores (from -2).

#include "X0_I0_SPELLS"
#include "x2_inc_spellhook"
#include "nw_i0_invocatns"

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
object oTarget = GetSpellTargetObject();
//effect eVis = EffectVisualEffect(VFX_HIT_SPELL_NECROMANCY); // NWN1 VFX
effect eVis = EffectVisualEffect( VFX_DUR_SPELL_BESTOW_CURSE ); // NWN2 VFX
effect eCurse = EffectCurse(3, 3, 3, 3, 3, 3);

//Make sure that curse is of type supernatural not magical
eCurse = SupernaturalEffect(eCurse);
effect eLink = EffectLinkEffects( eCurse, eVis );
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, OBJECT_SELF))
{
//Signal spell cast at event
SignalEvent(oTarget, EventSpellCastAt(oTarget, SPELL_BESTOW_CURSE));
//Make SR Check

/*////////////*/
// Draco Rayne: Added Eldritch Theurge Spellweave Ability
/*
//////////////*/

**int nMetaMagic = GetMetaMagicFeat();

if (GetHasFeat(FEAT_ELDRITCH_SPELLWEAVE))
{
if ( nMetaMagic & METAMAGIC_INVOC_FRIGHTFUL_BLAST ) DoETMetaFrightfulBlast(OBJECT_SELF, oTarget);
if ( nMetaMagic & METAMAGIC_INVOC_DRAINING_BLAST ) DoETMetaDrainingBlast(OBJECT_SELF, oTarget);
if ( nMetaMagic & METAMAGIC_INVOC_BESHADOWED_BLAST ) DoETMetaBeshadowedBlast(OBJECT_SELF, oTarget);
if ( nMetaMagic & METAMAGIC_INVOC_BEWITCHING_BLAST ) DoETMetaBewitchingBlast(OBJECT_SELF, oTarget);
if ( nMetaMagic & METAMAGIC_INVOC_HINDERING_BLAST ) DoETMetaHinderingBlast(OBJECT_SELF, oTarget);
}**

if (!MyResistSpell(OBJECT_SELF, oTarget))
{
//Make Will Save
if (!/*Will Save*/ MySavingThrow(SAVING_THROW_WILL, oTarget, GetSpellSaveDC()))
{
//Apply Effect and VFX
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget);
//ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); // NWN1 VFX
}
}
}
}

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License