Rune_PRC8/_module/nss/spell_suck.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

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));
}