PoA_PRC8/_module/nss/atropal_aura3.nss
Jaysyn904 bfbbd2f1ac Major update
Added several new undead models & facelifted overrides for other models.  Added dozens of new undead creatures from Libris Mortis & the monster manuals.  Added CODI Core AI.  Added NESS spawner system.  Added randomized respawning trap system.  Added undead feeding system.  Greatly revamped Catacombs & Halls of the Dead.  Updated nimtools.  Full compile.  Updated release archive.
2024-04-07 01:06:57 -04:00

56 lines
2.0 KiB
Plaintext

#include "nw_i0_spells"
#include "x2_inc_spellhook"
void main()
{
//Declare major variables
//Get the object that is exiting the AOE
object oTarget = GetExitingObject();
int bValid = FALSE;
int bRegen = FALSE;
int bTurn = FALSE;
effect eAOE;
int nEffectType;
object oPC = GetFirstPC();
// SendMessageToPC(oPC,"neaura3: OBJECT_SELF = " + GetName(OBJECT_SELF) +
// " Creator = " + GetName(GetAreaOfEffectCreator(OBJECT_SELF)) );
if(GetLocalInt(oTarget,"NEAura"))
{
//Search through the valid effects on the target.
eAOE = GetFirstEffect(oTarget);
while (GetIsEffectValid(eAOE) && bValid == FALSE)
{
// SendMessageToPC(oPC,"EffectCreator is "+ GetName(GetEffectCreator(eAOE)));
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator(OBJECT_SELF))
{
nEffectType = GetEffectType(eAOE);
if ( (nEffectType == EFFECT_TYPE_REGENERATE) ||
(nEffectType == EFFECT_TYPE_TURN_RESISTANCE_INCREASE) ||
(nEffectType == EFFECT_TYPE_NEGATIVELEVEL) )
{
//If the effect was created by the Acid_Fog then remove it
if(GetEffectSpellId(eAOE) == -1)
{
RemoveEffect(oTarget, eAOE);
if ( nEffectType == EFFECT_TYPE_NEGATIVELEVEL )
bValid = TRUE;
if ( nEffectType == EFFECT_TYPE_TURN_RESISTANCE_INCREASE )
bTurn = TRUE;
if ( nEffectType == EFFECT_TYPE_REGENERATE )
bRegen = TRUE;
if ( bTurn && bRegen )
bValid = TRUE;
}
}
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
SetLocalInt(oTarget,"NEAura",0);
}
}