PRC8/nwn/trunk/newspellbook/shd_myst_shdvsn.nss
Jaysyn904 5914ed2ab5 Updated Release Archive
Updated Release Archive.  Fixed Mage-killer prereqs.  Removed old LETO & ConvoCC related files.  Added organized spell scroll store.  Fixed Gloura spellbook. Various TLK fixes.  Reorganized Repo.  Removed invalid user folders. Added DocGen back in.
2023-08-22 10:00:21 -04:00

58 lines
2.4 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.

/*
14/02/19 by Stratovarius
Shadow Vision
Initiate, Veil of Shadows
Level/School: 4th/Transmutation
Range: Medium (100 ft. + 10 ft./level)
Target: One creature with an Intelligence of 3 or higher
Duration: 1 round/level
Saving Throw: Will negates
Spell Resistance: Yes
The subjects vision overlaps the Plane of Shadow, causing him to see flickering images, areas of darkness, and other visual discrepancies with the material world.
You impede the subjects vision and its ability to determine whats happening around it. The subject takes a 4 penalty on attack rolls, saves, and skill checks. In addition, you have total concealment with respect to the subject.
*/
#include "shd_inc_shdfunc"
#include "shd_mysthook"
#include "prc_inc_sp_tch"
void main()
{
if(!ShadPreMystCastCode()) return;
object oShadow = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
struct mystery myst = EvaluateMystery(oShadow, oTarget, METASHADOW_EXTEND);
if(myst.bCanMyst)
{
myst.nPen = ShadowSRPen(oShadow, myst.nShadowcasterLevel);
SignalEvent(oTarget, EventSpellCastAt(oShadow, myst.nMystId));
// Only creatures, and PvP check.
if(!GetIsReactionTypeFriendly(oTarget))
{
// Check Spell Resistance
if(!PRCDoResistSpell(oShadow, oTarget, myst.nPen))
{
if (!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, GetShadowcasterDC(oShadow), SAVING_THROW_TYPE_MIND_SPELLS))
{
myst.fDur = 6.0 * myst.nShadowcasterLevel;
if(myst.bExtend) myst.fDur *= 2;
myst.eLink = EffectLinkEffects(EffectMissChance(50), EffectAttackDecrease(4));
myst.eLink = EffectLinkEffects(myst.eLink, EffectSavingThrowDecrease(SAVING_THROW_ALL, 4));
myst.eLink = EffectLinkEffects(myst.eLink, EffectSkillDecrease(SKILL_ALL_SKILLS, 4));
myst.eLink = EffectLinkEffects(myst.eLink, EffectVisualEffect(VFX_DUR_BRIGHT_LIGHT_INDIGO_PULSE_SLOW));
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, myst.eLink, oTarget, myst.fDur, TRUE, myst.nMystId, myst.nShadowcasterLevel);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BLINDDEAD_DN_PURPLE), oTarget);
}
}
}
}
}