Aller au contenu

Photo

Off Hand APR


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
_Guile

_Guile
  • Members
  • 685 messages
 

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)

#2
WhiZard

WhiZard
  • Members
  • 1 204 messages
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.

#3
_Guile

_Guile
  • Members
  • 685 messages
Thanks WhiZard, I kind of figured it out though and already coded it.. =)

But thanks for your input anyway.. =)