Files
Anphillia_PRC8/_removed/x2_s0_batttideb.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

70 lines
2.2 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Battletide
//:: X2_S0_BattTideB
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
You create an aura that steals energy from your
enemies. Your enemies suffer a -2 circumstance
penalty on saves, attack rolls, and damage rolls,
once entering the aura. On casting, you gain a
+2 circumstance bonus to your saves, attack rolls,
and damage rolls.
Modified by : Rabidness
on : June 20 , 2004
Changes:
- Fixed an issue where the AOE would dispell if the CASTER left the AOE
...when the AOE was supposed to be centered ON the caster.
*/
//:://////////////////////////////////////////////
//:: Created By: Andrew Nobbs
//:: Created On: Dec 04, 2002
//:://////////////////////////////////////////////
//:: Last Updated By: Andrew Nobbs 06/06/03
#include "NW_I0_SPELLS"
#include "x2_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;
effect eAOE;
if(GetHasSpellEffect(517, oTarget))
{
//Rabidness addition, it shouldn't be possible for the center to leave
//the AOE that is centered on their body.
if ( GetLocalObject( oTarget , "oBattleTide" ) == oTarget )
return;
//Search through the valid effects on the target.
eAOE = GetFirstEffect(oTarget);
while (GetIsEffectValid(eAOE) && bValid == FALSE)
{
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator())
{
if(GetEffectType(eAOE) == EFFECT_TYPE_ATTACK_DECREASE ||
EFFECT_TYPE_DAMAGE_DECREASE || EFFECT_TYPE_SAVING_THROW_DECREASE)
{
//If the effect was created by the Battletide then remove it
if(GetEffectSpellId(eAOE) == 517)
{
RemoveEffect(oTarget, eAOE);
bValid = TRUE;
}
}
}
//Get next effect on the target
eAOE = GetNextEffect(oTarget);
}
}
}