PRC8/nwn/nwnprc/trunk/newspellbook/inv_dreadseizure.nss
Jaysyn904 2caeb8941c 2025/05/13 Update
Updated TF Shadowlord's prereq 2da.
Fixed CW Samurai's TWF levelup issue.
Added CW Samurai's skill 2DA back in.
Cleaned up ECL 2DA.
Fixed prereq bug with Imp Crit Eagle Claw.
Added Ability Focus feats for all Shapes, Essences & Invocations with DCs.
Fixed bug with 6th slot of crafting spells prereqs.
Added Reth Dekala HD to Initiator total.
Removed Dark Sun race files.
Updated all racial outsiders, monstrous humanoids, aberrations, giants, humanoids and fey to have the correct weapon & armor profs.
2025-05-13 23:05:31 -04:00

53 lines
1.7 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name Dread Seizure
//:: FileName inv_dreadseizure.nss
//::///////////////////////////////////////////////
/*
Lesser Invocation
4th Level Spell
You speak a word that sends wracking pain through
the limbs of a creature within 60'. The creature
can only move at half speed, and takes a -5 on
attack rolls. This effect lasts for 3 rounds, or is
negated by a fortitude save.
*/
//::///////////////////////////////////////////////
#include "inv_inc_invfunc"
#include "inv_invokehook"
void main()
{
if (!PreInvocationCastCode()) return;
object oPC = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
int nCasterLvl = GetInvokerLevel(oPC, GetInvokingClass());
int nDC = GetInvocationSaveDC(oTarget, oPC);
if (GetHasFeat(FEAT_ABFOC_DREAD_SEIZURE, oPC)) nDC += 2;
if(!GetIsReactionTypeFriendly(oTarget))
{
PRCSignalSpellEvent(oTarget, TRUE, INVOKE_DREAD_SEIZURE, oPC);
//SR
if(!PRCDoResistSpell(oPC, oTarget, nCasterLvl + SPGetPenetr()))
{
//save
if(!PRCMySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_SPELL))
{
effect eSlow = EffectMovementSpeedDecrease(50);
effect eAttack = EffectAttackDecrease(5);
effect eLink = EffectLinkEffects(eSlow, eAttack);
effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(3), TRUE, -1, nCasterLvl);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}
}