PRC8/nwn/nwnprc/trunk/smp/phs_s_foxscunn.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

73 lines
2.6 KiB
Plaintext
Raw Permalink 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.

/*:://////////////////////////////////////////////
//:: Spell Name Foxs Cunning
//:: Spell FileName PHS_S_FoxsCunn
//:://////////////////////////////////////////////
//:: In Game Spell desctiption
//:://////////////////////////////////////////////
Transmutation
Level: Brd 2, Sor/Wiz 2
Components: V, S, M/DF
Casting Time: 1 standard action
Range: Touch
Target: Creature touched
Duration: 1 min./level
Saving Throw: Will negates (harmless)
Spell Resistance: Yes
The transmuted creature becomes smarter. The spell grants a +4 enhancement
bonus to Intelligence, adding the usual benefits to Intelligence-based skill
checks and other uses of the Intelligence modifier. Wizards (and other
spellcasters who rely on Intelligence) affected by this spell do not gain
any additional bonus spells for the increased Intelligence, but the save
DCs for spells they cast while under this spells effect do increase. This
spell doesnt grant extra skill points.
Arcane Material Component: A few hairs, or a pinch of dung, from a fox.
//:://////////////////////////////////////////////
//:: Spell Effects Applied / Notes
//:://////////////////////////////////////////////
+4 to stat, doesn't stack with mass version.
//:://////////////////////////////////////////////
//:: Created By: Jasperre
//::////////////////////////////////////////////*/
#include "PHS_INC_SPELLS"
void main()
{
// Spell hook check.
if(!PHS_SpellHookCheck(PHS_SPELL_FOXS_CUNNING)) return;
// Declare major variables
object oCaster = OBJECT_SELF;
object oTarget = GetSpellTargetObject();
int nCasterLevel = PHS_GetCasterLevel();
int nMetaMagic = PHS_GetMetaMagicFeat();
// Ability to use
int nAbility = ABILITY_INTELLIGENCE;
// Duration - 1 minute/level
float fDuration = PHS_GetDuration(PHS_MINUTES, nCasterLevel, nMetaMagic);
// Make sure they are not immune to spells
if(PHS_TotalSpellImmunity(oTarget)) return;
// Check if oTarget has better effects already
if(PHS_GetHasAbilityBonusOfPower(oTarget, nAbility, 4) == 2) return;
// Delcare Effects
effect eAbility = EffectAbilityIncrease(nAbility, 4);
effect eVis = EffectVisualEffect(VFX_IMP_IMPROVE_ABILITY_SCORE);
effect eCessate = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
effect eLink = EffectLinkEffects(eAbility, eCessate);
// Signal the spell cast at event
PHS_SignalSpellCastAt(oTarget, PHS_SPELL_FOXS_CUNNING, FALSE);
// Remove these abilities effects
PHS_RemoveAnyAbilityBonuses(oTarget, nAbility);
// Apply effects and VFX to target
PHS_ApplyDurationAndVFX(oTarget, eVis, eLink, fDuration);
}