RoT2_PRC8/_module/nss/nw_s1_bltdaze.nss
Jaysyn904 499aba4eb3 Initial upload
Initial upload
2023-09-25 18:13:22 -04:00

48 lines
1.7 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Bolt: Daze
//:: NW_S1_BltDaze
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
Creature must make a ranged touch attack to hit
the intended target. Reflex or Will save is
needed to halve damage or avoid effect.
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: May 11 , 2001
//:://////////////////////////////////////////////
#include "prc_inc_spells"
//#include "wm_include"
#include "NW_I0_SPELLS"
void main()
{
//if (WildMagicOverride()) { return; }
//:: 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 = GetScaledDuration(nCount, oTarget);
effect eVis = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
effect eBolt = EffectDazed();
eBolt = GetScaledEffect(eBolt, oTarget);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eBolt, eDur);
eLink = EffectLinkEffects(eLink, eVis);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oNPC, SPELLABILITY_BOLT_DAZE));
//Make a saving throw check
if (!/*Will Save*/ PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS) && TouchAttackRanged(oTarget))
{
//Apply the VFX impact and effects
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nCount));
}
}