I remember someone saying that one of the files contained the formula to determine how dmg is calculated.
Which file is it?
Which file is it?
Thats awesome. I wanna test it out. This one isn't found on any CO files, right?Quote:
Of course. Everything related to pservers is simply "made up"
The only exception to that is when you are reading existing files (such as client itemtype or dmap files)
IIRC it goes something like...
Damage += Attacker.Pdmg - Attacked.Pdef;
if(Attacked.Bless > 0)
Damage -= Damage * (Attacked.Bless/100);
if(Attacked.TortPct > 0)
Damage -= Damage * (Attacked.TortPct/100);
if(Attacker.DragPct > 0)
Damage += Damage * (Attacker.DragPct /100);//this boost overal dmg by dragon gems or w/e other PERCENTAGE damage you are dealing
if(Attacker.Stigged)
Damage += Damage * (boost from stig level / 100);
if(Attacked.ManaShield)
Damage -= Damage * ( boost from mana shield / 100);
if(Attacked.XpShield)
Damage /= 3;
Damage += Attacker.TaliPdmg - Attacker.TaliPdef;
uint RebDiff = (uint)(Attacked.Reborn - Attacker.Reborn);
if(RebDiff > 0)
{
if(RebDiff == 1)
{
Damage *= .7;
}
else if(RebDiff == 2)
{
Damage *= .5;
}
}
if(Damage < 1)
Damage = 1;
return Damage;
Something along those lines. Don't think I forgot everything... Tali comes LAST (not effected by things like pdef and shield) Bless comes near the start, as do torts. Reborn comes near the end of calc.
May not be PERFECT but is damned close.
Note: just wrote this off the top of my head. Is not related to any source or pre-written code.