From b1c29a4fa6e4844054b60dc5598b0808c9c6958b Mon Sep 17 00:00:00 2001 From: Joseph Prezioso Jr Date: Wed, 30 Mar 2016 16:06:30 -0400 Subject: [PATCH] Setup proper Elo brackets with the top 1% being placed in diamond. Also changed starting Elo to 1400 (middle of Iron 1), leaving Coal as a purely regressive division. --- .../src/mineplex/core/elo/EloManager.java | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloManager.java b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloManager.java index 664947480..c20b8a942 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/elo/EloManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/elo/EloManager.java @@ -32,7 +32,7 @@ public class EloManager extends MiniDbClientPlugin public int getElo(UUID uuid, String gameType) { - int elo = 1000; + int elo = 1400; synchronized (_playerEloLock) { @@ -78,19 +78,29 @@ public class EloManager extends MiniDbClientPlugin double percentile = allElos.lastIndexOf(playerElo) * individualValue; - return CalculateDivision(percentile); + return CalculateDivision(playerElo, percentile); } - public String CalculateDivision(double divPercent) + public String CalculateDivision(int playerElo, double divPercent) { - if (divPercent == 100) return "Diamond"; - if (divPercent <= 99 && divPercent >= 81) return "Emerald"; - if (divPercent <= 80 && divPercent >= 61) return "Lapis"; - if (divPercent <= 60 && divPercent >= 41) return "Gold"; - if (divPercent <= 40 && divPercent >= 21) return "Iron"; + if (playerElo >= 3500 && divPercent > 99) return "Diamond"; + if (playerElo >= 3500) return "Emerald 3"; + if (playerElo < 3500 && playerElo >= 3300) return "Emerald 2"; + if (playerElo < 3300 && playerElo >= 3100) return "Emerald 1"; + if (playerElo < 3100 && playerElo >= 2900) return "Lapis 3"; + if (playerElo < 2900 && playerElo >= 2700) return "Lapis 2"; + if (playerElo < 2700 && playerElo >= 2500) return "Lapis 1"; + if (playerElo < 2500 && playerElo >= 2300) return "Gold 3"; + if (playerElo < 2300 && playerElo >= 2100) return "Gold 2"; + if (playerElo < 2100 && playerElo >= 1900) return "Gold 1"; + if (playerElo < 1900 && playerElo >= 1700) return "Iron 3"; + if (playerElo < 1700 && playerElo >= 1500) return "Iron 2"; + if (playerElo < 1500 && playerElo >= 1300) return "Iron 1"; + if (playerElo < 1300 && playerElo >= 800) return "Coal 3"; + if (playerElo < 800 && playerElo >= 600) return "Coal 2"; + if (playerElo < 600 && playerElo >= 400) return "Coal 1"; - //if none of the above are true, a player is in the bottom 20% - return "Coal"; + return "Result not found"; } public EloTeam getNewRatings(EloTeam teamA, EloTeam teamB, GameResult result)