PDA

View Full Version : damage reduction


moydock
08-19-2007, 05:00 AM
Is there something besides AC that reduces weapon damage done? Aside from parry/block type skills. I'm trying to figure out why a 3 dmg weapon @ lvl 1 hits for 3 max instead of 4.755 as it comes out in the max dmg formula. I set the mobs ac to 1 and i still hit for 3. Here's the equation and the math:

max_hit = (weapon_damage * (((GetSTR()*20) + (GetSkill(OFFENSE)*15) + (mylevel*10)) / 1000));

max_hit = (3 * (((75*20) + (5*15) + (1*10)) / 1000));
max_hit = (3 * (((1500) + (75) + (10)) / 1000));
max_hit = (3 * (1585) / 1000));
max_hit = (3 * 1.585);
max_hit = (3 * 1.585);
max_hit = (4.755);

KLS
08-19-2007, 05:58 AM
max_hit is an int so it can't store the 1.585 so it rounds to 1.

AC doesn't lower damage done yet.

As the comment above it states, there's some work to be done there.

However if you wanted to change it for now so it would work:


max_hit = (weapon_damage * ((GetSTR()*20) + (GetSkill(OFFENSE)*15) + (mylevel*10))) / 1000;

moydock
08-19-2007, 07:03 AM
OH! Okay, i'm dumb, I should have thought of that. I remembered int couldn't do decimals but I was only thinking about the ending result, not the actual calculation. Sorry for wasting your time <3. I'm just starting to figure out c++.

sfisque
08-21-2007, 07:55 AM
not sure if this is pertinent, but for anyone interested in updating the combat swing code, i found this info at steelwarrior:

http://www.thesteelwarrior.org/forum/showthread.php?t=13

mostly data crunching, but some good "math modelling" going on to give insight to how Live did (does?) it.

== sfisque

oldlurker
08-21-2007, 08:14 AM
The Tome of Knowledge Board from Paladins of Norrath also has an boatload of information from before and after the melee revamp.

http://p202.ezboard.com/Tomes-of-Knowledge-Read-Only/fpaladinsofnorrathtomesofknowledge