diff --git a/d3hog_driver.php b/d3hog_driver.php index e7987fe..c4580d2 100644 --- a/d3hog_driver.php +++ b/d3hog_driver.php @@ -31,6 +31,7 @@ EHP Score: EHPScore(), 2, '.', ','); ?>
sustainScore(), 2, '.', ','); ?>
Move Score: moveScore(), 2, '.', ','); ?>
Paragon Score: paragonScore(), 2, '.', ','); ?>
+Misc Score: miscScore(), 2, '.', ','); ?>

getStat('EHP Unbuffed'); + + if($ehp <= 500000) { + return $ehp / 10000; + } elseif(500000 < $ehp && $ehp <= 1000000) { + return 50 + ($ehp-500000) / 20000; + } elseif(1000000 < $ehp && $ehp <= 2000000) { + return 75 + ($ehp - 1000000) / 40000; + } else { + return 100 + ($ehp - 2000000) / 100000; + } + } + + function sustainScore() { + $effectiveLs = $this->getStat('DPS Unbuffed') * + $this->getStat('Life Steal') * .2; + $mitigation = $this->getStat('EHP Unbuffed') / $this->getStat('Life'); + + return 1 + $mitigation * ($this->getStat('Life on Hit') * + ($this->getStat('Attacks per Second') + 1) / 2 + + $this->getStat('Life per Second') + $effectiveLs) / + ($this->getStat('Life') * $this->EHPScore() * 10000 / + $this->getStat('EHP Unbuffed')); + } + + function miscScore() { + return 1 + ($this->getStat('+Maximum Discipline') / 2 + + $this->getStat('+Hatred Regenerated per Second') * 2 + + $this->getStat('+Discipline Regenerated per Second') * 15) / 100; + } +} \ No newline at end of file diff --git a/libs/dpclass.php b/libs/dpclass.php index 0c89943..92bc583 100644 --- a/libs/dpclass.php +++ b/libs/dpclass.php @@ -9,8 +9,8 @@ class DPClassFactory { switch($class) { case 'barbarian': return new Barbarian($characterPage, $elementalOnWeapon); - case 'wizard': - return new Wizard($characterPage, $elementalOnWeapon); + case 'demonhunter': + return new DemonHunter($characterPage, $elementalOnWeapon); default: return false; } @@ -20,7 +20,7 @@ class DPClassFactory { function findClass($characterPage) { preg_match('{(.*?)}', $characterPage, $class); - return strtolower($class[1]); + return str_replace(' ', '', strtolower($class[1])); } } @@ -41,7 +41,7 @@ class DPClass { function hallScore() { return $this->DPSScore() * $this->EHPScore() * $this->sustainScore() - * $this->moveScore() * $this->paragonScore(); + * $this->moveScore() * $this->paragonScore() * $this->miscScore(); } function DPSScore() { @@ -92,6 +92,10 @@ class DPClass { return 1 + $this->stats['Paragon Level'] / 2 / 100; } + function miscScore() { + return 1; + } + protected function isParagonMaxed() { return $this->getStat('Paragon Level') == 100;