PRC8/trunk/spells/sp_waves_fatg.nss
Jaysyn904 1662218bb4 Initial upload.
Adding base PRC 4.19a files to repository.
2022-10-07 13:51:24 -04:00

53 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//::///////////////////////////////////////////////
//:: Name Waves of Fatigue
//:: FileName sp_waves_fatg.nss
//:://////////////////////////////////////////////
/**@file Waves of Fatigue
Necromancy
Level: Sor/Wiz 5
Components: V, S
Casting Time: 1 standard action
Range: 30 ft.
Area: Cone-shaped burst
Duration: Instantaneous
Saving Throw: No
Spell Resistance: Yes
Waves of negative energy render all living creatures
in the spells area fatigued. This spell has no effect
on a creature that is already fatigued.
**/
//::////////////////////////////////////////////////
//:: Author: Tenjac
//:: Date : 29.9.06
//::////////////////////////////////////////////////
#include "prc_alterations"
#include "prc_inc_spells"
void main()
{
if(!X2PreSpellCastCode()) return;
PRCSetSchool(SPELL_SCHOOL_NECROMANCY);
object oPC = OBJECT_SELF;
location lLoc = PRCGetSpellTargetLocation();
object oTarget = MyFirstObjectInShape(SHAPE_SPELLCONE, 9.14f, lLoc, TRUE, OBJECT_TYPE_CREATURE);
int nCasterLevel = PRCGetCasterLevel(oPC);
int nPenetr = nCasterLevel + SPGetPenetr();
while(GetIsObjectValid(oTarget))
{
if(!PRCDoResistSpell(OBJECT_SELF, oTarget, nPenetr) && PRCGetIsAliveCreature(oTarget))
{
effect eEff = EffectFatigue();
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEff, oTarget, HoursToSeconds(8));
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE), oTarget);
}
oTarget = MyNextObjectInShape(SHAPE_SPELLCONE, 9.14f, lLoc, TRUE, OBJECT_TYPE_CREATURE);
}
PRCSetSchool();
}