Files
PRC8/nwn/nwnprc/trunk/newspellbook/shd_myst_ephemrl.nss
Jaysyn904 f2fae74d01 2026/04/25 Update
Tentatively fixed scrying for NWN:EE.
Added SCRY_AREA_BLOCKED & SCRY_FROM_AREA_BLOCKED area variables to control scrying.
Updated all scrying spells, powers & abilities  to use the above variables.
2026-04-25 21:01:33 -04:00

48 lines
1.3 KiB
Plaintext

/*
18/02/19 by Stratovarius
Ephemeral Image
Master, Dark Metamorphosis
Level/School: 7th/Illusion (Shadow)
Effect: One shadow duplicate
Duration: 1 minute/level
Saving Throw: None
Spell Resistance: No
You detach your own shadow and animate it with extraplanar energies, creating a dark-hued, hazy duplicate of yourself.
This mystery functions like the spell project image, except as noted above.
*/
#include "shd_inc_shdfunc"
#include "shd_mysthook"
#include "prc_inc_scry"
void main()
{
if(!ShadPreMystCastCode()) return;
object oShadow = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
struct mystery myst = EvaluateMystery(oShadow, oTarget, METASHADOW_EXTEND);
if(myst.bCanMyst)
{
// Check if current area blocks scrying
if(GetLocalInt(GetArea(oShadow), "SCRY_FROM_AREA_BLOCKED"))
{
FloatingTextStringOnCreature("This area prevents scrying.", oShadow, FALSE);
return;
}
myst.fDur = TurnsToSeconds(myst.nShadowcasterLevel);
if(myst.bExtend) myst.fDur *= 2;
SetLocalInt(oShadow, "ScryCasterLevel", myst.nShadowcasterLevel);
SetLocalInt(oShadow, "ScrySpellId", myst.nMystId);
SetLocalInt(oShadow, "ScrySpellDC", GetShadowcasterDC(oShadow));
SetLocalFloat(oShadow, "ScryDuration", myst.fDur);
ScryMain(oShadow, oShadow);
}
}