Fixed CCOH, Fixed starting GP, Fixed DMFI languages, Fix cep weapon appearances, Fixed new player start up system. Added PC deleter. Added ACP 4.1. Full compile. Updated release archive.
71 lines
2.5 KiB
Plaintext
71 lines
2.5 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Pulse: Dexterity 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_DEXTERITY));
|
|
//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_DEXTERITY, 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(oNPC));
|
|
}
|
|
}
|
|
|