#include "NW_I0_SPELLS" #include "prc_inc_spells" void DoChaDamage(object oTarget,object oOrigin) { effect eVis = EffectVisualEffect(VFX_IMP_REDUCE_ABILITY_SCORE); effect eVis2 = EffectVisualEffect(VFX_IMP_HEALING_S); int nDam = d6(); effect eRot = EffectAbilityDecrease(ABILITY_CHARISMA,nDam); effect eHeal = EffectHeal(5); ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT,eRot,oTarget); ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis2,oOrigin); ApplyEffectToObject(DURATION_TYPE_INSTANT,eHeal,oOrigin); } void main() { object oOrigin = OBJECT_SELF ; // Where the spell came from object oTarget = PRCGetSpellTargetObject(); // What the spell is aimed at if ( GetIsImmune(oTarget,IMMUNITY_TYPE_ABILITY_DECREASE) ) return; if ( PRCMySavingThrow(SAVING_THROW_FORT,oTarget,18) ) return; DelayCommand(0.1,DoChaDamage(oTarget,oOrigin)); }