Skip to content

Commit

Permalink
Enforce minimum combat level
Browse files Browse the repository at this point in the history
  • Loading branch information
villermen committed Feb 5, 2018
1 parent fad44ef commit 72bb566
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/HighScore/SkillHighScore.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ public function getCombatLevel($includeSummoning = true): int
$summoningLevel = 1;
}

return (int)((
return (int)max(3, (
max($attackLevel + $strengthLevel, $magicLevel * 2, $rangedLevel * 2) * 1.3 +
$defenceLevel + $constitutionLevel +
floor($prayerLevel / 2) + floor($summoningLevel / 2)
$defenceLevel + $constitutionLevel + floor($prayerLevel / 2) + floor($summoningLevel / 2)
) / 4);
}

Expand Down

0 comments on commit 72bb566

Please sign in to comment.