Initial upload.
Adding base PRC 4.19a files to repository.
This commit is contained in:
55
trunk/spells/nw_s0_greasea.nss
Normal file
55
trunk/spells/nw_s0_greasea.nss
Normal file
@@ -0,0 +1,55 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Grease: On Enter
|
||||
//:: NW_S0_GreaseA.nss
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Creatures entering the zone of grease must make
|
||||
a reflex save or fall down. Those that make
|
||||
their save have their movement reduced by 1/2.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: Aug 1, 2001
|
||||
//:://////////////////////////////////////////////
|
||||
|
||||
//:: modified by mr_bumpkin Dec 4, 2003 for PRC stuff
|
||||
#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
|
||||
int nMetaMagic = PRCGetMetaMagicFeat();
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_SLOW);
|
||||
effect eSlow = EffectMovementSpeedDecrease(50);
|
||||
effect eLink = EffectLinkEffects(eVis, eSlow);
|
||||
object oTarget = GetEnteringObject();
|
||||
float fDelay = PRCGetRandomDelay(1.0, 2.2);
|
||||
|
||||
int nPenetr = SPGetPenetrAOE(GetAreaOfEffectCreator());
|
||||
|
||||
|
||||
if(spellsIsTarget(oTarget, SPELL_TARGET_STANDARDHOSTILE, GetAreaOfEffectCreator()))
|
||||
{
|
||||
if(!GetHasFeat(FEAT_WOODLAND_STRIDE, oTarget) &&(GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) != TRUE) )
|
||||
{
|
||||
//Fire cast spell at event for the target
|
||||
SignalEvent(oTarget, EventSpellCastAt(GetAreaOfEffectCreator(), SPELL_GREASE));
|
||||
int nDC = PRCGetSaveDC(oTarget,GetAreaOfEffectCreator());
|
||||
if(DEBUG) DoDebug("nw_s0_greasec running, SpellId: " + IntToString(PRCGetSpellId()));
|
||||
|
||||
if(!PRCMySavingThrow(SAVING_THROW_REFLEX, oTarget, (nDC), SAVING_THROW_TYPE_NONE, OBJECT_SELF, fDelay))
|
||||
{
|
||||
//Apply reduced movement effect and VFX_Impact
|
||||
SPApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oTarget,0.0f,FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DeleteLocalInt(OBJECT_SELF, "X2_L_LAST_SPELLSCHOOL_VAR");
|
||||
// Getting rid of the local integer storing the spellschool name
|
||||
}
|
Reference in New Issue
Block a user