Files
PRC8/nwn/nwnprc/trunk/spells/nw_s1_auraelecc.nss
Jaysyn904 f397206b74 2026/04/27 Update
Fighter was missing Weapon Proficiency: Scythe.
Tentative fix for Sweeping Strike + Eldritch Glaive.
Fixed Necrocarnum Weapon reducing AB.
Updated creature abilities to more closely follow PnP.
Updated tlk for Sanctified & Holy Ki Strike.
2026-04-27 10:31:20 -04:00

50 lines
1.8 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Aura of Electricity on Heartbeat
//:: NW_S1_AuraElecC.nss
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Prolonged exposure to the aura of the creature
causes electrical damage to all within the aura.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 25, 2001
//:://////////////////////////////////////////////
#include "prc_inc_spells"
void main()
{
//:: Declare major variables
object oNPC = GetAreaOfEffectCreator();
int nHD = GetHitDice(oNPC);
int nZap = 1 + (nHD / 3);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nDC = 10 + nCHAMod + (nHD/2);
int nDamage;
effect eDam;
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
//Get first target in spell area
object oTarget = GetFirstInPersistentObject();
while (GetIsObjectValid(oTarget))
{
if(GetIsEnemy(oTarget, GetAreaOfEffectCreator()))
{
nDamage = d4(nZap);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_AURA_ELECTRICITY));
//Make a saving throw check
if(PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_ELECTRICITY))
{
nDamage = nDamage / 2;
}
eDam = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_ELECTRICAL);
//Apply the VFX impact and effects
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
//Get next target in spell area
oTarget = GetNextInPersistentObject();
}
}