kd calculated per match
This commit is contained in:
parent
76e758d527
commit
98f327466d
1 changed files with 4 additions and 4 deletions
|
|
@ -181,8 +181,8 @@ function Get-MatchStatsPlayer {
|
||||||
if ($MatchType) {
|
if ($MatchType) {
|
||||||
$filterProperty = 'matchType'
|
$filterProperty = 'matchType'
|
||||||
}
|
}
|
||||||
#$alives = (($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).deathType | Measure-Object -sum).sum
|
$alives = (($killstats | where-object { $_.stats.playername -eq $player -and $_.stats.$filterProperty -like $typemodevalue }).deathType | where-object {$_ -eq 'alive'}).count
|
||||||
$deaths = (($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).deaths | Measure-Object -sum).sum
|
$deaths = (($killstats | where-object { $_.stats.playername -eq $player -and $_.stats.$filterProperty -like $typemodevalue }).deathType | where-object {$_ -ne 'alive'}).count
|
||||||
$kills = (($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).kills | Measure-Object -sum).sum
|
$kills = (($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).kills | Measure-Object -sum).sum
|
||||||
$dbno = (($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).dbno | Measure-Object -sum).sum
|
$dbno = (($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).dbno | Measure-Object -sum).sum
|
||||||
$humankills = (($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).humankills | Measure-Object -sum).sum
|
$humankills = (($killstats.stats | where-object { $_.playername -eq $player -and $_.$filterProperty -like $typemodevalue }).humankills | Measure-Object -sum).sum
|
||||||
|
|
@ -206,8 +206,8 @@ function Get-MatchStatsPlayer {
|
||||||
kills = $kills
|
kills = $kills
|
||||||
humankills = $humankills
|
humankills = $humankills
|
||||||
matches = $player_matches
|
matches = $player_matches
|
||||||
KD_H = $humankills / $deaths
|
KD_H = $humankills / ($deaths + $alives) # KD_Human calculated per match (kills / (deaths + alives))
|
||||||
KD_ALL = $kills / $deaths
|
KD_ALL = $kills / ($deaths + $alives) # KD_ALL calculated per match (kills / (deaths + alives))
|
||||||
winratio = $winratio
|
winratio = $winratio
|
||||||
wins = $player_wins
|
wins = $player_wins
|
||||||
dbno = $dbno
|
dbno = $dbno
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue