PRC8_fork/trunk/newspellbook/moi_wchb_abrogat.nss
Jaysyn904 1662218bb4 Initial upload.
Adding base PRC 4.19a files to repository.
2022-10-07 13:51:24 -04:00

41 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
26/1/21 by Stratovarius
Word of Abrogation (Sp): Beginning at 6th level, you
can use your command of incarnum to counterspell your
enemies. To do so, you must first ready an action. If any
creature within 60 feet of you casts a spell or uses a spell-like
ability, you can attempt to negate the effect as an immediate
action with a caster level check (DC 11 + the enemy creatures
caster level), using your meldshaper level as your caster level.
You gain a +1 bonus on the check for every point of essentia
you invest in this ability. You can abrogate only one spell or
spell-like effect with each use of this ability, so if you are
facing multiple spellcasters, you must decide which one to
target with your word of abrogation and wait until your chosen
target takes its turn.
*/
#include "moi_inc_moifunc"
void main()
{
object oMeldshaper = OBJECT_SELF;
// If you've already got it, clean up instead
if (!GetLocalInt(oMeldshaper, "Abrogation"))
{
int nEssentia = GetEssentiaInvested(oMeldshaper, MELD_WITCH_ABROGATION);
int nMeldshaperLvl = GetMeldshaperLevel(oMeldshaper, GetPrimaryIncarnumClass(oMeldshaper), MELD_WITCH_ABROGATION);
// This is because if you've readied an action to counterspell, you can't attack
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, SupernaturalEffect(EffectLinkEffects(EffectSlow(), EffectAttackDecrease(-40))), oMeldshaper, 9999.0);
SetLocalInt(oMeldshaper, "Abrogation", 10+nMeldshaperLvl+nEssentia);
}
else
{
DeleteLocalInt(oMeldshaper, "Abrogation");
PRCRemoveSpellEffects(MELD_WITCH_ABROGATION, oMeldshaper, oMeldshaper);
GZPRCRemoveSpellEffects(MELD_WITCH_ABROGATION, oMeldshaper, FALSE);
}
}