Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can this be explained mathematically?
#4
From http://www.southperry.net/showthread.php?t=31437
Simplified to remove the if stuff, percentage based damage only.
Code:
int v5;
  double PDDMultsqrt;
  double v11;
  PDDMultsqrt = sqrt(PDDMult); // 70.71
  v5 = (a5 * PDDMultsqrt) / 100 + PDDMultsqrt; // a5 is some other defensive buff, I don't know what.  Anyway, if it's 0, this will be v5=70
(if moblevel > charlevel there's additional work here to reduce the value in v5)
  v11 = (100 - v5) * mob_base_damage * 0.01; // 30 * mob damage * 0.01
  return v11;

v5 is effectively truncating the percentage to a whole number (in this case 70%Wink.
Reply


Messages In This Thread
How can this be explained mathematically? - by Stereo - 2010-10-16, 09:28 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)