Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
32
trunk/spells/sp_cracklepdrB.nss
Normal file
32
trunk/spells/sp_cracklepdrB.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
////////////////////////////////////////
|
||||
// Cracklepowder On Exit
|
||||
// sp_cracklepdrB.nss
|
||||
////////////////////////////////////////
|
||||
#include "prc_inc_spells"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oTarget = GetExitingObject();
|
||||
effect eAOE;
|
||||
if(GetHasSpellEffect(SPELL_CRACKLEPOWDER, oTarget))
|
||||
{
|
||||
//Search through the valid effects on the target.
|
||||
eAOE = GetFirstEffect(oTarget);
|
||||
while (GetIsEffectValid(eAOE))
|
||||
{
|
||||
if (GetEffectCreator(eAOE) == GetAreaOfEffectCreator())
|
||||
{
|
||||
if(GetEffectType(eAOE) == EFFECT_TYPE_SKILL_DECREASE)
|
||||
{
|
||||
//If the effect was created by crackle powder then remove it
|
||||
if(GetEffectSpellId(eAOE) == SPELL_CRACKLEPOWDER)
|
||||
{
|
||||
RemoveEffect(oTarget, eAOE);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get next effect on the target
|
||||
eAOE = GetNextEffect(oTarget);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user