Update barb DPS score with adjusted APS
This commit is contained in:
parent
075028075b
commit
e07857d1af
3 changed files with 32 additions and 9 deletions
|
@ -4,6 +4,25 @@ class Barbarian extends DiabloClass {
|
|||
parent::__construct($stats, $type);
|
||||
}
|
||||
|
||||
function DPSScore() {
|
||||
if($this->type == 'pvp') {
|
||||
$eliteDivisor = 1;
|
||||
} else {
|
||||
$eliteDivisor = 2;
|
||||
}
|
||||
$dps = $this->stats->getStat('DPS Unbuffed') *
|
||||
max(1, 1 + ($this->stats->getStat('+DPS Against Elites') / $eliteDivisor));
|
||||
|
||||
if($this->type == 'pvp') {
|
||||
$aps = $this->stats->getStat('Attacks per Second');
|
||||
$overAps = $aps - 1;
|
||||
|
||||
$dps = $dps / (1 + ($overAps / 2));
|
||||
}
|
||||
|
||||
return $dps / 1000;
|
||||
}
|
||||
|
||||
function EHPScore() {
|
||||
$ehp = $this->calculateEHP();
|
||||
|
||||
|
|
|
@ -4,6 +4,18 @@ class DemonHunter extends DiabloClass {
|
|||
parent::__construct($stats, $type);
|
||||
}
|
||||
|
||||
function DPSScore() {
|
||||
if($this->type == 'pvp') {
|
||||
$eliteDivisor = 1;
|
||||
} else {
|
||||
$eliteDivisor = 2;
|
||||
}
|
||||
$dps = $this->stats->getStat('DPS Unbuffed') *
|
||||
max(1, 1 + ($this->stats->getStat('+DPS Against Elites') / $eliteDivisor));
|
||||
|
||||
return $dps / 1000;
|
||||
}
|
||||
|
||||
function EHPScore() {
|
||||
$ehp = $this->calculateEHP();
|
||||
|
||||
|
|
|
@ -48,15 +48,7 @@ class DiabloClass {
|
|||
}
|
||||
|
||||
function DPSScore() {
|
||||
if($this->type == 'pvp') {
|
||||
$eliteDivisor = 1;
|
||||
} else {
|
||||
$eliteDivisor = 2;
|
||||
}
|
||||
$dps = $this->stats->getStat('DPS Unbuffed') *
|
||||
max(1, 1 + ($this->stats->getStat('+DPS Against Elites') / $eliteDivisor));
|
||||
|
||||
return $dps / 1000;
|
||||
return 0;
|
||||
}
|
||||
|
||||
function EHPScore() {
|
||||
|
|
Loading…
Reference in a new issue