diff --git a/match_collector/champion_stat.ts b/match_collector/champion_stat.ts index b1bad4e..8b0c866 100644 --- a/match_collector/champion_stat.ts +++ b/match_collector/champion_stat.ts @@ -18,7 +18,7 @@ async function itemList() { function arrayRemovePercentage(array: Array<{count:number}>, totalGames:number, percentage: number) { let toRemove : Array<{count:number}> = [] for(let item of array) { - if((item.count/totalGames) < 0.05) { + if((item.count/totalGames) < percentage) { toRemove.push(item) } } @@ -175,8 +175,8 @@ async function championInfos(client, patch: number, champion: Champion) { let totalChampionMatches = winningMatches + losingMatches; + arrayRemovePercentage(lanes, totalChampionMatches, 0.2) lanes.sort((a, b) => b.count - a.count) - arrayRemovePercentage(lanes, totalChampionMatches, 0.15) // Filter runes to keep 3 most played runes.sort((a, b) => b.count - a.count)