Can you help?
Character.cpp, line 2327
weaponDescA2->uByte1 is the weapon classD6W = 0;
D5W = weaponDescA2->uByte1;
if (AttackTraceActive)
{
fprintf(GETFILE(TraceFile),"> Weapon class = %d so using skill ",D5W);
};
if ( (D5W == 0) || (D5W == 2) )
{
D6W = (i16)DetermineMastery(chIdx, 4);
if (AttackTraceActive)
{
fprintf(GETFILE(TraceFile),"4 (swing) which is mastery level %d\n",D6W);
};
};
if ( (D5W != 0) && (D5W < 16) )
{
D6W = sw(D6W + DetermineMastery(chIdx, 10));
if (AttackTraceActive)
{
fprintf(GETFILE(TraceFile),"10 (Throw) which is mastery level %d\n",D6W);
};
};
if ( (D5W >= 16) && (D5W < 112) )
{
D6W = sw(D6W + DetermineMastery(chIdx, 11));
if (AttackTraceActive)
{
fprintf(GETFILE(TraceFile),"11 (Shoot) which is mastery level %d\n",D6W);
};
};
D7W = sw(D7W + 2 * D6W);
which is 0 for most hand held weapons, but the axe, dagger and hardcleave are all =2
The first "if" is for 0 or 2
The second for !=0 and <16
The third for >=16 and <122
The axe, dagger and hardcleave all pass through this routine true for the first case and the second case (2=0 or 2 ) and (2= !=0 and <16)
I can see in my traces that hits with the axe are trying to use 04 swing (which my char has a mastery level 4) , but its falling through to the 2nd case, picking up mastery skill 10 throw (which my char has a mastery level 8 ) and adding that to the damage roll instead.
I would have thought the correct catch should be !=0 and !=2 and <16Damage calulation - stage 1 - weighting raw damage-----------------
> Str=47
> Raw damage (Str+rand(15))=58
> Weapon weight=5
and remains at 476 because your stamina > half max stamina
> (Maxload/16)=30
> Passed test 1 - Weapon weight (5) was less than maxload/16(30) so raw damage (raw damage + weapon weight -12)=51
> Raw damage + weapon dmg (10) = 61
> Weapon class = 2 so using skill 4 (swing) which is mastery level 4
10 (Throw) which is mastery level 8
> Raw damage + (2*skill mastery (8)) = 77 and remains at 77 because your stamina > half max stamina
> Log hand=1, D0W (ouches)=0, D1W=2
> Apply limits of 0 and 100 to (raw damage/2) = 38
> Raw damage char=2 hand=1 value=38
Code: Select all
if ( (D5W != 0) && (D5W != 2) && (D5W < 16) )
Cheers!
Nick K.