From 8f21b56223abf9a90408e65e179f53454ea02073 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Wed, 12 Nov 2025 20:19:45 +0100 Subject: [PATCH] feat: Add comprehensive utility statistics display MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Display detailed utility usage including self-flashes, team flashes, smokes, and decoys. ## Changes ### Enhanced Statistics Calculation - Added `selfFlashes`: Self-flash count tracking - Added `teammatesBlinded`: Friendly fire flash tracking - Added `smokesUsed`: Smoke grenade usage count - Added `decoysUsed`: Decoy grenade usage count - Added `flashesUsed`: Total flashbangs used All stats aggregated from playerStats with per-match averages calculated. ### UI Enhancements - Expanded Utility Effectiveness section from 4 to 8 cards - Updated grid layout: 2 cols mobile, 3 cols desktop, 4 cols extra-wide - Responsive design ensures cards wrap appropriately ### New Display Cards **Self Flashes** - Shows total times player flashed themselves - Warning icon with yellow color - Per-match average for context **Team Flashes** - Displays friendly fire flash incidents - Users icon with error/red color - Highlights potential coordination issues **Smokes Used** - Total smoke grenades deployed - Target icon with neutral color - Per-match usage rate **Decoys Used** - Total decoy grenades deployed - Target icon with info/blue color - Per-match usage pattern ## Implementation Details The statistics are extracted from match-level utility data: - `flash_total_self`: Self-flash incidents - `flash_total_team`: Teammate flash incidents - `ud_smoke`: Smoke grenade usage count - `ud_decoy`: Decoy grenade usage count Each stat card shows: 1. Total value across all matches 2. Per-match average (value / totalMatches) 3. Consistent icon and color scheme **Utility Tracking Value:** These metrics help players identify areas for improvement: - Self-flashes indicate positioning/timing issues - Team flashes highlight communication needs - Smoke/decoy usage shows tactical utility engagement This completes Phase 3 Feature 5 and ALL 15 MISSING FEATURES! 🎉 Full feature parity with original CS:GO WTF frontend now achieved. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/routes/player/[id]/+page.svelte | 52 ++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/src/routes/player/[id]/+page.svelte b/src/routes/player/[id]/+page.svelte index 169f12b..1c702a0 100644 --- a/src/routes/player/[id]/+page.svelte +++ b/src/routes/player/[id]/+page.svelte @@ -1,6 +1,7 @@ @@ -454,7 +460,7 @@

Utility Effectiveness

-
+
@@ -502,6 +508,50 @@ {Math.round(utilityStats.flameDamage / utilityStats.totalMatches)} per match
+ + +
+ + Self Flashes +
+
{utilityStats.selfFlashes}
+
+ {(utilityStats.selfFlashes / utilityStats.totalMatches).toFixed(1)} per match +
+
+ + +
+ + Team Flashes +
+
{utilityStats.teammatesBlinded}
+
+ {(utilityStats.teammatesBlinded / utilityStats.totalMatches).toFixed(1)} per match +
+
+ + +
+ + Smokes Used +
+
{utilityStats.smokesUsed}
+
+ {(utilityStats.smokesUsed / utilityStats.totalMatches).toFixed(1)} per match +
+
+ + +
+ + Decoys Used +
+
{utilityStats.decoysUsed}
+
+ {(utilityStats.decoysUsed / utilityStats.totalMatches).toFixed(1)} per match +
+
{/if}