PRC8/nwn/nwnprc/trunk/psionics/psi_pow_mmntpre.nss
Jaysyn904 5b44c74206 20025/05/27 Late Update
Expanded Disciple of Mephistopheles for epic progression.
Expanded Disciple of Soul Eater for epic progression.
Crusader's Aura of Triumph has a range of Touch.
Swordsage's Pearl of Black Doubt may actually increase AC now.
Crusader's Steely Resolve should start back up after logging back into MP.
Hopefully Desert Wind strikes will no longer burn the wielder when using Flame Weapon.
Keen Senses should go away when leaving Hunter's Senses stance.
Moment of Prescience should be calculating bonuses correctly.
2025-05-27 22:29:19 -04:00

91 lines
2.7 KiB
Plaintext

/*
----------------
Moment of Prescience, Psionic
psi_pow_mmntpre
----------------
25/3/05 by Stratovarius
*/ /** @file
Moment of Prescience, Psionic
Clairsentience
Level: Psion/wilder 7
Manifesting Time: 1 swift action
Range: Personal
Target: You
Duration: 1 round
Power Points: 13
Metapsionics: Extend
You add a bonus equal to your manifester level (max +25) to attack, armour
class, saves, or skills for the duration of the power.
Manifesting the power is a swift action, like manifesting a quickened power,
and it counts toward the normal limit of one quickened power per round.
*/
#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)
{
int nBonus = PRCMin(manif.nManifesterLevel, 25);
effect eLink = EffectVisualEffect(VFX_DUR_GLOBE_MINOR);
float fDuration = 6.0f;
if(manif.bExtend) fDuration *= 2;
switch(manif.nSpellID)
{
case POWER_MOMENTOFPRESCIENCEATTACK:
eLink = EffectLinkEffects(eLink, EffectAttackIncrease(nBonus));
break;
case POWER_MOMENTOFPRESCIENCEARMOUR:
eLink = EffectLinkEffects(eLink, EffectACIncrease(nBonus));
break;
case POWER_MOMENTOFPRESCIENCESAVES:
eLink = EffectLinkEffects(eLink, EffectSavingThrowIncrease(SAVING_THROW_ALL, nBonus));
break;
case POWER_MOMENTOFPRESCIENCESKILLS:
eLink = EffectLinkEffects(eLink, EffectSkillIncrease(SKILL_ALL_SKILLS, nBonus));
break;
default:{
string sErr = "psi_pow_mmntpre: ERROR: Unknown spellID: " + IntToString(manif.nSpellID);
if(DEBUG) DoDebug(sErr);
else WriteTimestampedLogEntry(sErr);
}
}
SPApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, fDuration, TRUE, manif.nSpellID, manif.nManifesterLevel);
}
}