Horsefly Swamp update
Creatures & encounter tables to support Horsefly swamp expansion.
This commit is contained in:
78
_module/nss/desecrating_aur3.nss
Normal file
78
_module/nss/desecrating_aur3.nss
Normal file
@@ -0,0 +1,78 @@
|
||||
#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 bAttack = FALSE;
|
||||
int bDamage = FALSE;
|
||||
int bCon = FALSE;
|
||||
int bSaves = FALSE;
|
||||
int bVis = FALSE;
|
||||
|
||||
effect eAOE;
|
||||
int nEffectType;
|
||||
|
||||
DeleteLocalInt(oTarget,"TurnPenalty");
|
||||
|
||||
if(GetLocalInt(oTarget,"DEAura") == 1)
|
||||
{
|
||||
//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_ATTACK_INCREASE) ||
|
||||
(nEffectType == EFFECT_TYPE_DAMAGE_INCREASE) ||
|
||||
(nEffectType == EFFECT_TYPE_SAVING_THROW_INCREASE) ||
|
||||
(nEffectType == EFFECT_TYPE_VISUALEFFECT) ||
|
||||
(nEffectType == EFFECT_TYPE_ABILITY_INCREASE) )
|
||||
{
|
||||
//If the effect was created by the Acid_Fog then remove it
|
||||
if(GetEffectSpellId(eAOE) == -1)
|
||||
{
|
||||
RemoveEffect(oTarget, eAOE);
|
||||
if ( nEffectType == EFFECT_TYPE_ATTACK_INCREASE )
|
||||
{
|
||||
bAttack = TRUE;
|
||||
// AssignCommand(oTarget,SpeakString("Removed Attack"));
|
||||
}
|
||||
if ( nEffectType == EFFECT_TYPE_DAMAGE_INCREASE )
|
||||
{
|
||||
bDamage = TRUE;
|
||||
// AssignCommand(oTarget,SpeakString("Removed Damage"));
|
||||
}
|
||||
if ( nEffectType == EFFECT_TYPE_SAVING_THROW_INCREASE )
|
||||
{
|
||||
bSaves = TRUE;
|
||||
// AssignCommand(oTarget,SpeakString("Removed Saves"));
|
||||
}
|
||||
if ( nEffectType == EFFECT_TYPE_ABILITY_INCREASE )
|
||||
{
|
||||
bCon = TRUE;
|
||||
// AssignCommand(oTarget,SpeakString("Removed Ability"));
|
||||
}
|
||||
if ( nEffectType == EFFECT_TYPE_VISUALEFFECT )
|
||||
{
|
||||
// AssignCommand(oTarget,SpeakString("Removed VFX"));
|
||||
bVis = TRUE;
|
||||
}
|
||||
if ( bAttack || bDamage || bSaves || bCon || bVis )
|
||||
bValid = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next effect on the target
|
||||
eAOE = GetNextEffect(oTarget);
|
||||
}
|
||||
if ( GetLocalInt(oTarget,"DEAura") != 2 )
|
||||
SetLocalInt(oTarget,"DEAura",0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user