Files
PRC8/nwn/nwnprc/trunk/spells/nw_s1_bltlightn.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

56 lines
1.8 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Bolt: Lightning
//:: NW_S1_BltLightn
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Does 1d6 per level to a single target.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Aug 10, 2001
//:: Updated On: July 15, 2003 Georg Zoeller - Removed saving throws
//:://////////////////////////////////////////////
#include "prc_inc_spells"
#include "prc_inc_sp_tch"
#include "NW_I0_SPELLS"
void main()
{
//:: Declare major variables
object oNPC = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nHD = GetHitDice(oNPC);
int nCHAMod = GetAbilityModifier(ABILITY_CHARISMA, oNPC);
int nDC = 10 +nCHAMod+ (nHD/2);
int nCount = nHD/2;
if (nCount == 0) { nCount = 1; }
int nDamage = d6(nCount);
effect eLightning = EffectBeam(VFX_BEAM_LIGHTNING, OBJECT_SELF,BODY_NODE_HAND);
effect eVis = EffectVisualEffect(VFX_IMP_LIGHTNING_S);
effect eBolt;
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_LIGHTNING));
//Adjust the damage based on the Reflex Save, Evasion and Improved Evasion.
//nDamage = GetReflexAdjustedDamage(nDamage, oTarget, nDC,SAVING_THROW_TYPE_ELECTRICITY);
//Make a ranged touch attack
int nTouch = PRCDoRangedTouchAttack(oTarget);
if(nTouch > 0)
{
if(nTouch == 2)
{
nDamage *= 2;
}
//Set damage effect
eBolt = PRCEffectDamage(oTarget, nDamage, DAMAGE_TYPE_ELECTRICAL);
if(nDamage > 0)
{
//Apply the VFX impact and effects
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eBolt, oTarget);
}
}
}