Further file organization
Further file organization
This commit is contained in:
59
nwn/nwnprc/trunk/smp/phs_s_stinkclouc.nss
Normal file
59
nwn/nwnprc/trunk/smp/phs_s_stinkclouc.nss
Normal file
@@ -0,0 +1,59 @@
|
||||
/*:://////////////////////////////////////////////
|
||||
//:: Spell Name Stinking Cloud: Heartbeat
|
||||
//:: Spell FileName PHS_S_StinkClouC
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Spell Effects Applied / Notes
|
||||
//:://////////////////////////////////////////////
|
||||
Basically do the same for On Enter as it does for all the people without
|
||||
the effect in our AOE.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jasperre
|
||||
//::////////////////////////////////////////////*/
|
||||
|
||||
#include "PHS_INC_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Check AOE
|
||||
if(!PHS_CheckAOECreator()) return;
|
||||
|
||||
// Declare major variables
|
||||
object oTarget;
|
||||
object oCaster = GetAreaOfEffectCreator();
|
||||
int nSpellSaveDC = PHS_GetAOESpellSaveDC();
|
||||
|
||||
// Declare Effects
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S);
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_NEGATIVE);
|
||||
effect eDaze = EffectDazed();
|
||||
effect eCessate = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
|
||||
// Link effects
|
||||
effect eLink = EffectLinkEffects(eMind, eDaze);
|
||||
eLink = EffectLinkEffects(eLink, eCessate);
|
||||
|
||||
// Start cycling through the AOE Object for viable targets
|
||||
oTarget = GetFirstInPersistentObject(OBJECT_SELF, OBJECT_TYPE_CREATURE);
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
// PvP check
|
||||
if(!GetIsReactionTypeFriendly(oTarget, oCaster) &&
|
||||
// Make sure they are not immune to spells
|
||||
!PHS_TotalSpellImmunity(oTarget) &&
|
||||
// Not got it already
|
||||
!PHS_GetHasAOEEffects(PHS_SPELL_STINKING_CLOUD, oTarget))
|
||||
{
|
||||
// Fire cast spell at event for the target
|
||||
PHS_SignalSpellCastAt(oTarget, PHS_SPELL_STINKING_CLOUD);
|
||||
|
||||
// Fortitude save
|
||||
if(!PHS_SavingThrow(SAVING_THROW_FORT, oTarget, nSpellSaveDC, SAVING_THROW_TYPE_NONE, oCaster))
|
||||
{
|
||||
// Apply effects
|
||||
PHS_AOE_OnEnterEffectsVFX(eLink, oTarget, eVis, PHS_SPELL_STINKING_CLOUD);
|
||||
}
|
||||
}
|
||||
//Get next target.
|
||||
oTarget = GetNextInPersistentObject(OBJECT_SELF, OBJECT_TYPE_CREATURE);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user