Hm... I imagine it could be something roughly similar to this snippet (which would produce just the results Noah outlined):
Assuming randFloat() is a function that produces random floats in the interval [0, 1).
Also, I am fairly sure the skill mult is calculated first, because what if the crit mult is 0? You'd have a divide by 0 error there.
Code:
// C++
int getDamage(int min, int max, int skillPercent, int critPercent, bool crit)
{
int damage = (min + randFloat()*(max-min+1)) * skillPercent / 100;
if (crit)
{
damage = damage * (skillPercent + critPercent)/skillPercent;
}
return damage;
}Assuming randFloat() is a function that produces random floats in the interval [0, 1).
Also, I am fairly sure the skill mult is calculated first, because what if the crit mult is 0? You'd have a divide by 0 error there.

