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

49 lines
1.6 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Bolt: Charm
//:: NW_S1_BltCharm
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creature must make a ranged touch attack to hit
the intended target.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 11 , 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 + 1) / 2;
nCount = PRCGetScaledDuration(nCount, oTarget);
effect eVis = EffectVisualEffect(VFX_IMP_CHARM);
effect eBolt = EffectCharmed();
eBolt = GetScaledEffect(eBolt, oTarget);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eBolt, eDur);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, SPELLABILITY_BOLT_CHARM));
//Make a saving throw check
if (PRCDoRangedTouchAttack(oTarget))
{
//Apply the VFX impact and effects
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}