From 7b717c9c6afe572c9f6c944cce42fcaa29dd4334 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Tue, 9 Apr 2013 23:02:03 -0400 Subject: [PATCH] DH requires DPS to be modified by attacks per second --- libs/demonhunter.php | 7 +++++++ libs/diabloclass.php | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/libs/demonhunter.php b/libs/demonhunter.php index 4433802..4c18afd 100644 --- a/libs/demonhunter.php +++ b/libs/demonhunter.php @@ -55,6 +55,13 @@ class DemonHunter extends DiabloClass { $this->stats->getStat('+Discipline Regenerated per Second') * 15) / 100; } + function modifyDPSUnbuffed() { + parent::modifyDPSUnbuffed(); + + $this->stats->stats['DPS Unbuffed'] = $this->stats->stats['DPS Unbuffed'] / + (1 + $this->stats->stats['Attacks per Second'] / 2); + } + protected function calculateEHP() { if($this->type == 'pvp') { diff --git a/libs/diabloclass.php b/libs/diabloclass.php index a55ff00..1a3f783 100644 --- a/libs/diabloclass.php +++ b/libs/diabloclass.php @@ -103,6 +103,16 @@ class DiabloClass { return $this->stats->getStat('Paragon Level') == 100; } + function modifyDPSUnbuffed() { + if($this->type == 'pvp') { + $eliteDivisor = 1; + } else { + $eliteDivisor = 2; + } + $this->stats->stats['DPS Unbuffed'] = $this->stats->getStat('DPS Unbuffed') * + max(1, 1 + ($this->stats->getStat('+DPS Against Elites') / $eliteDivisor)); + } + private function elementalDamage() { $totalElemental = 0; @@ -135,16 +145,6 @@ class DiabloClass { } } - function modifyDPSUnbuffed() { - if($this->type == 'pvp') { - $eliteDivisor = 1; - } else { - $eliteDivisor = 2; - } - $this->stats->stats['DPS Unbuffed'] = $this->stats->getStat('DPS Unbuffed') * - max(1, 1 + ($this->stats->getStat('+DPS Against Elites') / $eliteDivisor)); - } - function modifyEHP() { $this->calculateEHP(); }