Files
PRC8/nwn/nwnprc/trunk/spells/nw_s0_darknessb.nss
Jaysyn904 c437270cd1 2026/05/28 Afternoon update
Updated damagtypes.2da for CEP3 reserved rows.
Added and setup Darkvision icon.
Added and setup Ultravision icon.
Added spell icon for Thicket of Blades.
Fixed Blacklight, Cloud of the Archeai, Darkness, Deeper Darkness, Damning Darkness, Utterdark, Grasping Shadows, Dawn and Dusk and Child of Shadow and Light for Telflammar Shadowlord's Shadow Blur and Shadow Sight abilities.
Updated Blacklight's TLK entry.
Created a constant for Shadow Discorporation.
Fixed Shadow Time never ending on the targets.
Updated prc_inc_combat to use monk iterative progression if warranted.
Updated PRCGetIsRealSpellKnownByClass() to handle Sublime Chord better. (@Lightbeard)
Added class heartbeat script for Shadowlord to handle Shadow Blur and Shadow Sight.
Added ShadowlordEffects() to prc_inc_spells.
Added constants for new damagetypes.
Completely rewrote Verminlord's Vermin Domination.
Fixed duration for Empathic Feedback.
Fixed Morality Undone to not break characters over a server reset.
2026-05-28 16:27:19 -04:00

84 lines
2.8 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Darkness: On Exit
//:: NW_S0_DarknessB.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creates a globe of darkness around those in the area
of effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Feb 28, 2002
//:://////////////////////////////////////////////
#include "prc_inc_spells"
void main()
{
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_EVOCATION);
object oTarget = GetExitingObject();
object oCreator = GetAreaOfEffectCreator();
if(DEBUG) DoDebug(GetName(oTarget) + " is leaving " + GetName(oCreator) + "'s darkness effect");
int bValid = FALSE;
effect eAOE;
//Search through the valid effects on the target.
eAOE = GetFirstEffect(oTarget);
while(GetIsEffectValid(eAOE))
{
int nType = GetEffectType(eAOE);
int nID = GetEffectSpellId(eAOE);
object oEffectCreator = GetEffectCreator(eAOE);
if((nID == SPELL_DARKNESS ||
nID == SPELLABILITY_AS_DARKNESS ||
nID == SPELL_SHADOW_CONJURATION_DARKNESS ||
nID == 688 || //bioware SLA darkness
nID == SHADOWLORD_DARKNESS ||
nID == SPELL_RACE_DARKNESS ||
nID == SPELL_DEEPER_DARKNESS ||
nID == INVOKE_DARKNESS ||
(nID == -1 && (GetObjectType(GetEffectCreator(eAOE)) == OBJECT_TYPE_ITEM) && GetLocalInt(OBJECT_SELF, "PRC_AoE_IPRP_Init")) // Item-based AoE
) &&
GetEffectCreator(eAOE) == oCreator &&
nType != EFFECT_TYPE_AREA_OF_EFFECT
)
{
if(DEBUG) DoDebug(GetName(oTarget) + " has an effect from " + GetName(oCreator) + "'s darkness effect");
RemoveEffect(oTarget, eAOE);
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
effect eEffect = GetFirstEffect(oTarget);
while(GetIsEffectValid(eEffect))
{
if(GetEffectTag(eEffect) == "SHADOWSIGHT+BLUR")
{
RemoveEffect(oTarget, eEffect);
if(DEBUG) DoDebug("sp_blacklightb >> Removing SHADOWSIGHT+BLUR");
}
if(GetEffectTag(eEffect) == "PNP_DARKNESS")
RemoveEffect(oTarget, eEffect);
if(GetEffectTag(eEffect) == "PNP35_DARKNESS")
RemoveEffect(oTarget, eEffect);
if(GetEffectTag(eEffect) == "BIO_DARKNESS")
RemoveEffect(oTarget, eEffect);
eEffect = GetNextEffect(oTarget);
}
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
// Getting rid of the local integer storing the spellschool name
}