Further file organization
Further file organization
This commit is contained in:
19
nwn/nwnprc/trunk/scripts/prc_ft_rngdisarm.nss
Normal file
19
nwn/nwnprc/trunk/scripts/prc_ft_rngdisarm.nss
Normal file
@@ -0,0 +1,19 @@
|
||||
#include "prc_inc_combmove"
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = OBJECT_SELF;
|
||||
object oTarget = PRCGetSpellTargetObject();
|
||||
|
||||
if (oTarget == oPC) return; // No hitting yourself
|
||||
if (GetLocalInt(oPC, "CombatLoopProtection")) return; // Stop the damn loop
|
||||
|
||||
int nBonus = 0;
|
||||
// This counteracts the bonus from Improved Disarm if the PC has it
|
||||
if (GetHasFeat(FEAT_PRC_IMP_DISARM, oPC)) nBonus -= 4;
|
||||
|
||||
DoDisarm(oPC, oTarget, nBonus, FALSE, FALSE);
|
||||
|
||||
SetLocalInt(oPC, "CombatLoopProtection", TRUE);
|
||||
DelayCommand(4.0, DeleteLocalInt(oPC, "CombatLoopProtection"));
|
||||
}
|
Reference in New Issue
Block a user