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

61 lines
1.6 KiB
Plaintext

/*
----------------
Tactical Insight
tob_etbl_tacins.nss
----------------
10 MAR 09 by GC
*/ /** @file
Although you may be young by the elve's reckoning,
your blade guide lends you the experience and wisdom
of one who has fought battles across countless fields.
For the rest of your turn, any opponent you hit with
a melee attack takes a penalty to AC equal to your
Intelligence bonus (if any) for 1 round.
If you lose access to your blade guide, you lose
this ability until it returns.
*/
#include "tob_inc_move"
#include "tob_movehook"
////#include "prc_alterations"
void main()
{
if (!PreManeuverCastCode())
{
// If code within the PreManeuverCastCode (i.e. UMD) reports FALSE, do not run this spell
return;
}
// End of Spell Cast Hook
object oInitiator = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
if(!TakeSwiftAction(oInitiator)) return;
// Blade guide check
if(GetLocalInt(oInitiator, "ETBL_BladeGuideDead"))
{
FloatingTextStringOnCreature("*Cannot use ability without blade guide*", oInitiator, FALSE);
return;
}
struct maneuver move = EvaluateManeuver(oInitiator, oTarget, TRUE);
effect eNone;
if(move.bCanManeuver)
{
effect eAC;
int nInt = GetAbilityModifier(ABILITY_INTELLIGENCE, oInitiator);
if(nInt >= 1) eAC = EffectACDecrease(nInt);
PerformAttackRound(oTarget, oInitiator, eAC, 6.0, 0, 0, 0, FALSE, "", "", FALSE, FALSE, TRUE);
// Expend ability
SetLocalInt(oInitiator, "ETBL_Tactical_Insight_Expended", TRUE);
}
}