Further file organization
Further file organization
This commit is contained in:
48
nwn/nwnprc/trunk/smp/phs_s_shield.nss
Normal file
48
nwn/nwnprc/trunk/smp/phs_s_shield.nss
Normal file
@@ -0,0 +1,48 @@
|
||||
/*:://////////////////////////////////////////////
|
||||
//:: Spell Name Shield
|
||||
//:: Spell FileName PHS_S_Shield
|
||||
//:://////////////////////////////////////////////
|
||||
//:: In Game Spell desctiption
|
||||
//:://////////////////////////////////////////////
|
||||
+4 Shield AC, and stops magic missile attacks. Personal, 1 min/level.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Spell Effects Applied / Notes
|
||||
//:://////////////////////////////////////////////
|
||||
It is an invisble shield, no need for a VFX.
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Jasperre
|
||||
//::////////////////////////////////////////////*/
|
||||
|
||||
#include "PHS_INC_SPELLS"
|
||||
|
||||
void main()
|
||||
{
|
||||
// Spell Hook Check.
|
||||
if(!PHS_SpellHookCheck(PHS_SPELL_SHIELD)) return;
|
||||
|
||||
// Declare Major Variables
|
||||
object oCaster = OBJECT_SELF;
|
||||
object oTarget = GetSpellTargetObject();
|
||||
int nMetaMagic = PHS_GetMetaMagicFeat();
|
||||
int nCasterLevel = PHS_GetCasterLevel();
|
||||
|
||||
// 1 Turn/level
|
||||
float fDuration = PHS_GetDuration(PHS_MINUTES, nCasterLevel, nMetaMagic);
|
||||
|
||||
// Delcare effects
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_AC_BONUS);
|
||||
effect eAC = EffectACIncrease(4, AC_SHIELD_ENCHANTMENT_BONUS);
|
||||
effect eCessate = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
|
||||
|
||||
// Link effects
|
||||
effect eLink = EffectLinkEffects(eAC, eCessate);
|
||||
|
||||
// Remove previous castings
|
||||
PHS_RemoveSpellEffectsFromTarget(PHS_SPELL_SHIELD, oTarget);
|
||||
|
||||
// Signal spell cast at
|
||||
PHS_SignalSpellCastAt(oTarget, PHS_SPELL_SHIELD, FALSE);
|
||||
|
||||
// Apply effects
|
||||
PHS_ApplyDurationAndVFX(oTarget, eVis, eLink, fDuration);
|
||||
}
|
Reference in New Issue
Block a user