ahd #182

Merged
OpzekerIT merged 1 commit from dev into main 2024-10-31 12:37:51 +00:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit fd02ebf6b2 - Show all commits

View file

@ -54,6 +54,7 @@ $ogDescription = "Explore detailed player statistics over the past month includi
echo "<table border='1' class='sortable'>";
echo "<tr>
<th>Player</th>
<th>AHD</th>
<th>Win %</th>
<th>K/D Human</th>
<th>Human Kills</th>
@ -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 "<tr>
<td><a href='latestmatches.php?selected_player=$player_name'>$player_name</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$ahd</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$winratio</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$KD_H</a></td>
<td><a href='latestmatches.php?selected_player=$player_name'>$humankills</a></td>

View file

@ -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 {