Files
PRC8/nwn/nwnprc/trunk/scripts/prc_tn_des_b.nss
Jaysyn904 01eb86d307 2026/03/20 Update
Fixed issue where Factotum's Arcane Dilettante post rest dialog wasn't appearing.
Desecrate now correctly doubles a caster's Animate Dead HD pool.
Effects are now removed when leaving an area of Desecration.
Undead HD pool is now calculated correctly in Animate Dead.
2026-03-20 18:07:36 -04:00

47 lines
1.6 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Desecrate onExit script
//:: prc_tn_des_b
//:://////////////////////////////////////////////
/*
You create an aura that boosts the undead
around you.
*/
#include "prc_alterations"
void main()
{
object oTarget = GetExitingObject();
// Search through the valid effects on the target
effect eAOE = GetFirstEffect(oTarget);
while (GetIsEffectValid(eAOE))
{
// If the effect was created by the AoE then remove it
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator())
{
string sTag = GetEffectTag(eAOE);
if(sTag == "EFFECT_DESECRATE_AURA" || sTag == "EFFECT_DESECRATE_HP")
RemoveEffect(oTarget, eAOE);
}
// Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
}
/* object oTarget = GetExitingObject();
if(GetHasSpellEffect(SPELL_DES_20, oTarget) || GetHasSpellEffect(SPELL_DES_100, oTarget) || GetHasSpellEffect(SPELL_DESECRATE, oTarget))
{
//Search through the valid effects on the target.
effect eAOE = GetFirstEffect(oTarget);
while (GetIsEffectValid(eAOE))
{
if(GetEffectCreator(eAOE) == GetAreaOfEffectCreator())
{
if(GetEffectSpellId(eAOE) == SPELL_DES_20 || GetEffectSpellId(eAOE) == SPELL_DESECRATE || GetEffectSpellId(eAOE) == SPELL_DES_100)
RemoveEffect(oTarget, eAOE);
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
} */