From: Steinar H. Gunderson Date: Thu, 27 Jul 2023 10:59:34 +0000 (+0200) Subject: Goal counts as a touch. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f23692525864984376d5f97c3f6fcc72c2870861;p=pkanalytics Goal counts as a touch. --- diff --git a/ultimate.js b/ultimate.js index 200303c..f913e3d 100644 --- a/ultimate.js +++ b/ultimate.js @@ -374,6 +374,9 @@ function calc_stats(json, filters) { last_pull_was_ours = !offense; between_points = false; } else if (type === 'goal' || type === 'their_goal' || type === 'stoppage') { + if (type === 'goal') { + if (keep) ++p.touches; + } for (const [q,p] of Object.entries(players)) { if (p.on_field_since === null) { continue;