PRC8/nwn/nwnprc/trunk/psionics/psi_pow_elfsight.nss
Jaysyn904 6ec137a24e Updated AMS marker feats
Updated AMS marker feats.  Removed arcane & divine marker feats.  Updated Dread Necromancer for epic progression. Updated weapon baseitem models.  Updated new weapons for crafting & npc equip.
 Updated prefix.  Updated release archive.
2024-02-11 14:01:05 -05:00

79 lines
2.3 KiB
Plaintext

/*
----------------
Elf Sight
psi_pow_elfsight
----------------
6/11/04 by Stratovarius
*/ /** @file
Elf Sight
Psychometabolism
Level: Psion/wilder 2, psychic warrior 1
Manifesting Time: 1 standard action
Range: Personal
Target: You
Duration: 1 hour/level
Power Points: Psion/wilder 3, psychic warrior 1
Metapsionics: Extend
You gain low-light vision (as an elf) for the duration of the power, as well
as a +2 bonus on Search and Spot checks.
In addition, you gain the ability to notice secret or concealed doors by
merely passing within 5 feet of one, getting to make a Search check as if
you were actively looking for it.
*/
#include "psi_inc_psifunc"
#include "psi_inc_pwresist"
#include "psi_spellhook"
#include "prc_alterations"
void main()
{
/*
Spellcast Hook Code
Added 2004-11-02 by Stratovarius
If you want to make changes to all powers,
check psi_spellhook to find out more
*/
if (!PsiPrePowerCastCode())
{
// If code within the PrePowerCastHook (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
object oManifester = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
struct manifestation manif =
EvaluateManifestation(oManifester, oTarget,
PowerAugmentationProfile(),
METAPSIONIC_EXTEND
);
if(manif.bCanManifest)
{
effect eLink = EffectSkillIncrease(SKILL_SPOT, 2);
eLink = EffectLinkEffects(eLink, EffectSkillIncrease(SKILL_SEARCH, 2));
eLink = EffectLinkEffects(eLink, EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE));
effect eVis = EffectVisualEffect(VFX_IMP_MAGICAL_VISION);
object oSkin = GetPCSkin(oManifester);
float fDuration = HoursToSeconds(manif.nManifesterLevel);
if(manif.bExtend) fDuration *= 2;
IPSafeAddItemProperty(oSkin, ItemPropertyBonusFeat(IP_CONST_FEAT_KEEN_SENSES), fDuration, X2_IP_ADDPROP_POLICY_KEEP_EXISTING, FALSE, FALSE);
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, -1, manif.nManifesterLevel);
SPApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}