Moved PRC'd creature abilities from module to new top hak
Moved PRC'd creature abilities from module to new top hak.
This commit is contained in:
72
_content/hak/aantioch_top/nw_s1_pulsintdr.nss
Normal file
72
_content/hak/aantioch_top/nw_s1_pulsintdr.nss
Normal file
@@ -0,0 +1,72 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: Pulse: Intelligence Drain
|
||||
//:: NW_S1_PulsDeath
|
||||
//:: Copyright (c) 2001 Bioware Corp.
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
A wave of energy emanates from the creature which affects
|
||||
all within 10ft. Damage can be reduced by half for all
|
||||
damaging variants.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Preston Watamaniuk
|
||||
//:: Created On: May 14, 2000
|
||||
//:://////////////////////////////////////////////
|
||||
#include "NW_I0_SPELLS"
|
||||
#include "prc_inc_spells"
|
||||
//#include "wm_include"
|
||||
|
||||
void main()
|
||||
{
|
||||
//if (WildMagicOverride()) { return; }
|
||||
|
||||
//:: Declare major variables
|
||||
object oNPC = OBJECT_SELF;
|
||||
object oTarget;
|
||||
|
||||
int nHD = GetHitDice(oNPC);
|
||||
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
|
||||
int nDC = 10 +nCHAMod+ (nHD/2);
|
||||
|
||||
int nDamage = nHD/5;
|
||||
|
||||
if (nDamage == 0) {nDamage = 1;}
|
||||
|
||||
float fDelay;
|
||||
|
||||
effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY);
|
||||
effect eHowl;
|
||||
effect eImpact = EffectVisualEffect(VFX_IMP_PULSE_NEGATIVE);
|
||||
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eImpact, oNPC);
|
||||
|
||||
//Get first target in spell area
|
||||
oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(oNPC));
|
||||
while(GetIsObjectValid(oTarget))
|
||||
{
|
||||
if(oTarget != oNPC)
|
||||
{
|
||||
if(!GetIsReactionTypeFriendly(oTarget))
|
||||
{
|
||||
|
||||
//Fire cast spell at event for the specified target
|
||||
SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_PULSE_ABILITY_DRAIN_INTELLIGENCE));
|
||||
//Determine effect delay
|
||||
fDelay = GetDistanceBetween(oNPC, oTarget)/20;
|
||||
//Make a saving throw check
|
||||
if(!/*FortSave*/PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE, oNPC, fDelay))
|
||||
{
|
||||
//Set the Ability mod and change to supernatural effect
|
||||
eHowl = EffectAbilityDecrease(ABILITY_INTELLIGENCE, nDamage);
|
||||
eHowl = SupernaturalEffect(eHowl);
|
||||
//Apply the VFX impact and effects
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_PERMANENT, eHowl, oTarget));
|
||||
DelayCommand(fDelay, ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
//Get first target in spell area
|
||||
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_LARGE, GetLocation(OBJECT_SELF));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user