PRC8/nwn/nwnprc/trunk/newspellbook/bnd_vest_karsusp.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

59 lines
1.8 KiB
Plaintext

/**
* @file
* Spellscript for Karsus Vestige
*
*/
#include "bnd_inc_bndfunc"
#include "prc_inc_template"
#include "prc_inc_sp_tch"
#include "inc_dispel"
void main()
{
object oBinder = OBJECT_SELF;
int nCasterLevel = GetBinderLevel(oBinder, VESTIGE_KARSUS);
int nDC = GetBinderDC(oBinder, VESTIGE_KARSUS);
int nSpell, nUses;
int nSLA = GetSpellId();
effect eNone;
int nInstant = FALSE;
if (nSLA == VESTIGE_KARSUS_DISPEL)
{
if(!BindAbilCooldown(oBinder, VESTIGE_KARSUS_DISPEL, VESTIGE_KARSUS)) return;
}
switch(nSLA){
case VESTIGE_KARSUS_SENSES:
{
DoRacialSLA(SPELL_DETECT_MAGIC, nCasterLevel, nDC, nInstant);
break;
}
case VESTIGE_KARSUS_DISPEL:
{
object oTarget = PRCGetSpellTargetObject();
nUses = nCasterLevel;
// Check uses per day
if (GetLegacyUses(oBinder, nSLA) >= nUses)
{
FloatingTextStringOnCreature("You have used " + GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", nSLA))) + " the maximum amount of times today.", oBinder, FALSE);
return;
}
else
{
SetLegacyUses(oBinder, nSLA);
FloatingTextStringOnCreature("You have "+IntToString(nUses - GetLegacyUses(oBinder, nSLA))+ " uses of " + GetStringByStrRef(StringToInt(Get2DACache("spells", "Name", nSLA))) + " remaining today.", oBinder, FALSE);
if(PRCDoMeleeTouchAttack(oTarget))
{
effect eVis = EffectVisualEffect(VFX_IMP_BREACH);
effect eImpact = EffectVisualEffect(VFX_FNF_DISPEL);
spellsDispelMagicMod(oTarget, nCasterLevel, eVis, eImpact);
}
}
break;
}
}
}