Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
66
trunk/spells/nw_s0_stinkclda.nss
Normal file
66
trunk/spells/nw_s0_stinkclda.nss
Normal file
@@ -0,0 +1,66 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Stinking Cloud On Enter
|
||||
//:: NW_S0_StinkCldA.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Those within the area of effect must make a
|
||||
fortitude save or be dazed.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 17, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003
|
||||
#include "prc_inc_spells"
|
||||
#include "prc_add_spell_dc"
|
||||
|
||||
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
SetLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR", SPELL_SCHOOL_CONJURATION);
|
||||
|
||||
//Declare major variables
|
||||
effect eStink = EffectDazed();
|
||||
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
|
||||
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
|
||||
effect eLink = EffectLinkEffects(eMind, eStink);
|
||||
eLink = EffectLinkEffects(eLink, eDur);
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_DAZED_S);
|
||||
effect eFind;
|
||||
object oTarget;
|
||||
object oCreator;
|
||||
float fDelay;
|
||||
int nPenetr = SPGetPenetrAOE(GetAreaOfEffectCreator());
|
||||
|
||||
//Get the first object in the persistant area
|
||||
oTarget = GetEnteringObject();
|
||||
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectConcealment(20), oTarget, 6.0);
|
||||
if (spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||
{
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELL_STINKING_CLOUD));
|
||||
//Make a SR check
|
||||
if(!PRCDoResistSpell(GetAreaOfEffectCreator(), oTarget,nPenetr))
|
||||
{
|
||||
//Make a Fort Save
|
||||
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, (PRCGetSaveDC(oTarget,GetAreaOfEffectCreator())), SAVING_THROW_TYPE_POISON))
|
||||
{
|
||||
fDelay = PRCGetRandomDelay(0.75, 1.75);
|
||||
//Apply the VFX impact and linked effects
|
||||
if (GetIsImmune(oTarget, IMMUNITY_TYPE_POISON) == FALSE)
|
||||
{
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
DelayCommand(fDelay, SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the integer used to hold the spells spell school
|
||||
}
|
Reference in New Issue
Block a user