PRC8/nwn/nwnprc/trunk/scripts/prc_shar_confuse.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

35 lines
1.3 KiB
Plaintext

/*
Celebrant of Sharess Confuses a creature under the effect of fascinate
*/
#include "prc_inc_spells"
void main()
{
object oPC = OBJECT_SELF;
DecrementRemainingFeatUses(oPC, FEAT_CELEBRANT_SHARESS_FASCINATE);
DecrementRemainingFeatUses(oPC, FEAT_CELEBRANT_SHARESS_DOMINATE);
object oTarget = PRCGetSpellTargetObject();
int nClass = GetLevelByClass(CLASS_TYPE_CELEBRANT_SHARESS, oPC);
int nCha = GetAbilityModifier(ABILITY_CHARISMA, oPC);
int nDC = 10 + nClass + nCha;
effect eVis = EffectVisualEffect(VFX_IMP_CONFUSION_S);
effect eConfuse = PRCEffectConfused();
effect eMind = EffectVisualEffect(VFX_DUR_MIND_AFFECTING_DISABLED);
effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE);
effect eLink = EffectLinkEffects(eMind, eConfuse);
eLink = EffectLinkEffects(eLink, eDur);
eLink = SupernaturalEffect(eLink);
//Fire cast spell at event for the specified target
SignalEvent(oTarget, EventSpellCastAt(oPC, PRCGetSpellId()));
if(GetHasSpellEffect(SPELL_SHARESS_FASCINATE, oTarget))
{
if(!PRCMySavingThrow(SAVING_THROW_WILL, oTarget, nDC, SAVING_THROW_TYPE_MIND_SPELLS))
{
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, HoursToSeconds(nClass));
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
}
}