PRC8/nwn/nwnprc/trunk/scripts/prc_ft_spnhlbrd.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

45 lines
1.5 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Spinning Halberd
//:: prc_ft_spnhlbrd.nss
//::///////////////////////////////////////////////
/*
If you hit the same creature with both your
sword and your axe in the same round, you may
make a free trip attempt against that foe.
*/
//:://////////////////////////////////////////////
//:: Modified By: Stratovarius
//:: Modified On: 11.11.2018
//:://////////////////////////////////////////////
#include "prc_inc_combat"
void main()
{
object oPC = OBJECT_SELF;
object oTarget = PRCGetSpellTargetObject();
effect eVis = EffectVisualEffect(VFX_IMP_FLAME_M);
effect eDummy;
object oRight = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC);
object oLeft = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC);
if (GetBaseItemType(oRight) == BASE_ITEM_HALBERD)
{
PerformAttackRound(oTarget, oPC, eDummy);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, ExtraordinaryEffect(EffectACIncrease(1, AC_DODGE_BONUS)), oPC, 6.0);
int nAttack = GetAttackRoll(oTarget, oPC, oRight, 0, 0, -5);
if (nAttack > 0)
{
int nDam = d6(nAttack) + (GetAbilityModifier(ABILITY_STRENGTH, oPC) * nAttack);
ApplyEffectToObject(DURATION_TYPE_INSTANT, ExtraordinaryEffect(EffectDamage(nDam, DAMAGE_TYPE_BLUDGEONING)), oTarget);
}
}
else
{
FloatingTextStringOnCreature("You do not have the right weapon equipped for Spinning Halberd", oPC, FALSE);
PerformAttackRound(oTarget, oPC, eDummy);
}
}