38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
#include "NW_I0_SPELLS"
|
|
#include "prc_inc_spells"
|
|
|
|
void DoAbilityDamage(object oTarget, object oCaster)
|
|
{
|
|
|
|
effect eVis = EffectVisualEffect(VFX_IMP_MAGBLUE);
|
|
int nDam = 2;
|
|
int nType = ABILITY_INTELLIGENCE;
|
|
if ( GetLevelByClass(CLASS_TYPE_CLERIC,oTarget) > 1 ||
|
|
GetLevelByClass(CLASS_TYPE_PALADIN,oTarget) > 1 ||
|
|
GetLevelByClass(CLASS_TYPE_RANGER,oTarget) > 1 ||
|
|
GetLevelByClass(CLASS_TYPE_DRUID,oTarget) > 1 )
|
|
nType = ABILITY_WISDOM;
|
|
if ( GetLevelByClass(CLASS_TYPE_SORCERER,oTarget) > 1 ||
|
|
GetLevelByClass(CLASS_TYPE_BARD,oTarget) > 1 )
|
|
nType = ABILITY_CHARISMA;
|
|
|
|
effect eDam = EffectAbilityDecrease(nType,nDam);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT,eVis,oTarget);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eDam,oTarget);
|
|
|
|
}
|
|
|
|
void main()
|
|
{
|
|
object oTarget = PRCGetSpellTargetObject();
|
|
object oCaster = OBJECT_SELF;
|
|
|
|
/* int bIsPoisoned = GetLocalInt(oTarget,"IsPoisoned");
|
|
if ( bIsPoisoned )
|
|
return; */
|
|
|
|
DelayCommand(0.1,DoAbilityDamage(oTarget,oCaster));
|
|
|
|
}
|