From fd02ebf6b22e45398c4629a5d6b48d95b0f3d876 Mon Sep 17 00:00:00 2001 From: Lanta Date: Thu, 31 Oct 2024 13:13:56 +0100 Subject: [PATCH] ahd --- last_stats.php | 3 +++ update/matchparser.ps1 | 3 +++ 2 files changed, 6 insertions(+) diff --git a/last_stats.php b/last_stats.php index 397fe5a..53154a0 100644 --- a/last_stats.php +++ b/last_stats.php @@ -54,6 +54,7 @@ $ogDescription = "Explore detailed player statistics over the past month includi echo ""; echo " + @@ -120,6 +121,7 @@ $ogDescription = "Explore detailed player statistics over the past month includi $winratio = number_format($player_data['winratio'], 2, ',', ''); $originalChange = str_replace(',', '.', $player_data['change']); // replace comma with period $change = floatval($originalChange); + $ahd = number_format($player_data['ahd'], 2, ',', ''); if ($originalChange < 0) { $imagePath = 'images\red.png'; @@ -133,6 +135,7 @@ $ogDescription = "Explore detailed player statistics over the past month includi echo " + diff --git a/update/matchparser.ps1 b/update/matchparser.ps1 index 68f1986..a268374 100644 --- a/update/matchparser.ps1 +++ b/update/matchparser.ps1 @@ -211,6 +211,7 @@ function Get-MatchStatsPlayer { $winratio_old = (($oldstats.$friendlyname | Where-Object { $_.playername -eq $player }).winratio) $winratio = Get-winratio -player_wins $player_wins -player_matches $player_matches $change = get-change -OldWinRatio $winratio_old -NewWinRatio $winratio + $avarage_human_damage = [math]::Round(($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).HumanDmg / $player_matches) write-host $filterProperty write-host $typemodevalue @@ -232,6 +233,8 @@ function Get-MatchStatsPlayer { wins = $player_wins dbno = $dbno change = $change + ahd = $avarage_human_damage + } } $MatchStatsPlayer_sorted = $MatchStatsPlayer | ForEach-Object {
PlayerAHD Win % K/D Human Human Kills
$player_name$ahd $winratio $KD_H $humankills