Author Topic: Off Hand APR  (Read 360 times)

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Off Hand APR
« on: May 28, 2013, 12:23:42 am »


                

WhiZard wrote...

int GetMainHandAPR(object oCreature = OBJECT_SELF)
{
int nAPR, nAB, nHD, nMonk;
nHD = GetHitDice(oCreature);
nAB = GetBaseAttackBonus(oCreature);
if(nHD > 20) nAB -= (nHD - 19)/2;
nMonk = GetLevelByclass(class_TYPE_MONK, oCreature);
if(nMonk) nAPR = (nAB + 2)/3;
else nAPR = (nAB + 4)/5;
if(nAPR < 1) nAPR = 1;
if(nAPR > 6) nAPR = 6;
return nAPR;
}


Thanks again Whizard for this awesome slice of code, will use it.   =)

Doing some work on NWNX_COOL demo module I'm building with some quality include scripts...


Need help with getting off hand attacks / round (APR)
               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Off Hand APR
« Reply #1 on: May 28, 2013, 11:18:53 pm »


               Offhand calculations are much more straight forward.  If a character has an offhand weapon he has one offhand APR unless he has improved two weapon fighting in which case he has two.  The issue with offhand APR is that unless it is gotten at the exact instance needed to calculate, the player could unequip the offhand feigning to be wielding a single weapon.  While for the main hand it is reasonable to assume that a player is making use of as many of the APR possible (e.g. not fighting with dirty fighting nor using a crossbow without rapid reload), the same assumption cannot be made for off-hand as there are many who would prefer a shield AC boost or the extra damage of a two-handed weapon rather than extra attacks with significant penalties unless mitigated by feats.
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
Off Hand APR
« Reply #2 on: May 30, 2013, 03:33:18 pm »


               Thanks WhiZard, I kind of figured it out though and already coded it.. =)

But thanks for your input anyway.. =)