{% extends "base.html" %} {% block content %}
{% if player.avatar_url %} {% else %}
{{ player.username[:2]|upper if player.username else '??' }}
{% endif %}

{{ player.username }}

OPPONENT

{{ player.steam_id_64 }}

Matches vs Us
{{ history|length }}
{% set wins = history | selectattr('is_win') | list | length %} {% set wr = (wins / history|length * 100) if history else 0 %}
Their Win Rate
{{ "%.1f"|format(wr) }}%
{% set avg_rating = history | map(attribute='rating') | sum / history|length if history else 0 %}
Their Avg Rating
{{ "%.2f"|format(avg_rating) }}
{% set avg_kd_diff = history | map(attribute='kd_diff') | sum / history|length if history else 0 %}
Avg K/D Diff
{{ "%+.2f"|format(avg_kd_diff) }}

📈 Performance vs ELO Segments

🛡️ Side Preference (vs Us)

{% macro side_row(label, t_val, ct_val, format_str='{:.2f}') %}
{{ label }}
{{ (format_str.format(t_val) if t_val is not none else '—') }} vs {{ (format_str.format(ct_val) if ct_val is not none else '—') }}
{% set has_t = t_val is not none %} {% set has_ct = ct_val is not none %} {% set total = (t_val or 0) + (ct_val or 0) %} {% if total > 0 and has_t and has_ct %} {% set t_pct = ((t_val or 0) / total) * 100 %}
{% else %}
{% endif %}
T-Side CT-Side
{% endmacro %} {{ side_row('Rating', side_stats.get('rating_t'), side_stats.get('rating_ct')) }} {{ side_row('K/D Ratio', side_stats.get('kd_t'), side_stats.get('kd_ct')) }}
Rounds Sampled
{{ (side_stats.get('rounds_t', 0) or 0) + (side_stats.get('rounds_ct', 0) or 0) }}

Match History (Head-to-Head)

{% for m in history %} {% endfor %}
Date / Map Their Result Match Elo Their Rating Their K/D K/D Diff (vs Team) K / D
{{ m.map_name }}
{{ 'WON' if m.is_win else 'LOST' }} {{ "%.0f"|format(m.elo or 0) }} {{ "%.2f"|format(m.rating or 0) }} {{ "%.2f"|format(m.kd_ratio or 0) }} {% set diff = m.kd_diff %} {{ "%+.2f"|format(diff) }}
vs Team Avg {{ "%.2f"|format(m.other_team_kd or 0) }}
{{ m.kills }} / {{ m.deaths }}
{% endblock %} {% block scripts %} {% endblock %}