From 1922897d05987195529d33fa40cd1957b3779337 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 10 Apr 2013 00:04:28 -0400 Subject: [PATCH] Add DRs for DH sustain formula --- libs/demonhunter.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/demonhunter.php b/libs/demonhunter.php index c61e4d7..9c12375 100644 --- a/libs/demonhunter.php +++ b/libs/demonhunter.php @@ -41,11 +41,21 @@ class DemonHunter extends DiabloClass { } - return 1 + $mitigation * ($loh * + $rawSustainScore = 1 + $mitigation * ($loh * (1 + ($this->stats->getStat('Attacks per Second') - 1) / 2) + $this->stats->getStat('Life per Second') + $effectiveLs) / ($this->stats->getStat('Life') * $this->EHPScore() * 10000 / $this->stats->getStat('EHP Unbuffed')); + + if($rawSustainScore <= 1.5) { + return $rawSustainScore; + } elseif(1.5 < $rawSustainScore && $rawSustainScore <= 2) { + return 1.5 + ($rawSustainScore - 1.5) / 2; + } elseif(2 < $rawSustainScore && $rawSustainScore <= 3) { + return 1.75 + ($rawSustainScore - 2) / 4; + } else { + return 2 + ($rawSustainScore - 3) / 10; + } } function miscScore() {