1.5.0: Clutch fully recovered.

This commit is contained in:
2026-01-27 17:53:09 +08:00
parent 0be68a86f6
commit 50428ae2ac
5 changed files with 187 additions and 29 deletions

View File

@@ -162,12 +162,20 @@
{% endif %}
</div>
<div class="flex items-baseline gap-1 mb-1">
<span class="text-xl font-black text-gray-900 dark:text-white font-mono">
{{ format_str.format(value if value is not none else 0) }}
</span>
{% if sublabel %}
<span class="text-[10px] text-gray-400">{{ sublabel }}</span>
<div class="flex justify-between items-end mb-1">
<div class="flex items-baseline gap-1">
<span class="text-xl font-black text-gray-900 dark:text-white font-mono">
{{ format_str.format(value if value is not none else 0) }}
</span>
{% if sublabel %}
<span class="text-[10px] text-gray-400">{{ sublabel }}</span>
{% endif %}
</div>
{% if count_label is not none %}
<div class="text-[10px] font-bold text-gray-400 font-mono mb-0.5">
{{ count_label }}
</div>
{% endif %}
</div>
@@ -186,13 +194,6 @@
<span>H:{{ format_str.format(dist.max) }}</span>
</div>
{% endif %}
<!-- Count Label (Bottom Right) -->
{% if count_label is not none %}
<div class="absolute bottom-0 right-0 text-[10px] font-bold text-gray-400 font-mono">
{{ count_label }}
</div>
{% endif %}
</div>
{% endmacro %}
@@ -268,8 +269,8 @@
HPS (Clutch/Pressure) & PTL (Pistol)
</h4>
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-y-6 gap-x-4">
{{ detail_item('1v1 Win% (1v1胜率)', features['hps_clutch_win_rate_1v1'], 'hps_clutch_win_rate_1v1', '{:.1%}') }}
{{ detail_item('1v3+ Win% (残局大神)', features['hps_clutch_win_rate_1v3_plus'], 'hps_clutch_win_rate_1v3_plus', '{:.1%}') }}
{{ detail_item('Avg 1v1 (场均1v1)', features['hps_clutch_win_rate_1v1'], 'hps_clutch_win_rate_1v1', '{:.2f}') }}
{{ detail_item('Avg 1v3+ (场均1v3+)', features['hps_clutch_win_rate_1v3_plus'], 'hps_clutch_win_rate_1v3_plus', '{:.2f}') }}
{{ detail_item('Match Pt Win% (赛点胜率)', features['hps_match_point_win_rate'], 'hps_match_point_win_rate', '{:.1%}') }}
{{ detail_item('Pressure Entry (逆风首杀)', features['hps_pressure_entry_rate'], 'hps_pressure_entry_rate', '{:.1%}') }}
{{ detail_item('Comeback KD (翻盘KD)', features['hps_comeback_kd_diff'], 'hps_comeback_kd_diff') }}
@@ -300,19 +301,34 @@
<h4 class="text-xs font-black text-gray-400 uppercase tracking-widest mb-4 border-b border-gray-100 dark:border-slate-700 pb-2">
SPECIAL (Clutch & Multi)
</h4>
{% set matches = l2_stats.get('matches', 0) or 1 %}
{% set rounds = l2_stats.get('total_rounds', 0) or 1 %}
<div class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-y-6 gap-x-4">
{{ detail_item('1v1 Win%', (l2_stats.get('c1', 0) or 0) / rounds, 'l2_c1', '{:.1%}', count_label=l2_stats.get('c1', 0)) }}
{{ detail_item('1v2 Win%', (l2_stats.get('c2', 0) or 0) / rounds, 'l2_c2', '{:.1%}', count_label=l2_stats.get('c2', 0)) }}
{{ detail_item('1v3 Win%', (l2_stats.get('c3', 0) or 0) / rounds, 'l2_c3', '{:.1%}', count_label=l2_stats.get('c3', 0)) }}
{{ detail_item('1v4 Win%', (l2_stats.get('c4', 0) or 0) / rounds, 'l2_c4', '{:.1%}', count_label=l2_stats.get('c4', 0)) }}
{{ detail_item('1v5 Win%', (l2_stats.get('c5', 0) or 0) / rounds, 'l2_c5', '{:.1%}', count_label=l2_stats.get('c5', 0)) }}
{% set c1 = l2_stats.get('c1', 0) or 0 %}
{% set a1 = l2_stats.get('att1', 0) or 0 %}
{{ detail_item('1v1 Win% (1v1胜率)', c1 / a1 if a1 > 0 else 0, 'clutch_rate_1v1', '{:.1%}', count_label=c1 ~ '/' ~ a1) }}
{% set c2 = l2_stats.get('c2', 0) or 0 %}
{% set a2 = l2_stats.get('att2', 0) or 0 %}
{{ detail_item('1v2 Win% (1v2胜率)', c2 / a2 if a2 > 0 else 0, 'clutch_rate_1v2', '{:.1%}', count_label=c2 ~ '/' ~ a2) }}
{% set c3 = l2_stats.get('c3', 0) or 0 %}
{% set a3 = l2_stats.get('att3', 0) or 0 %}
{{ detail_item('1v3 Win% (1v3胜率)', c3 / a3 if a3 > 0 else 0, 'clutch_rate_1v3', '{:.1%}', count_label=c3 ~ '/' ~ a3) }}
{% set c4 = l2_stats.get('c4', 0) or 0 %}
{% set a4 = l2_stats.get('att4', 0) or 0 %}
{{ detail_item('1v4 Win% (1v4胜率)', c4 / a4 if a4 > 0 else 0, 'clutch_rate_1v4', '{:.1%}', count_label=c4 ~ '/' ~ a4) }}
{% set c5 = l2_stats.get('c5', 0) or 0 %}
{% set a5 = l2_stats.get('att5', 0) or 0 %}
{{ detail_item('1v5 Win% (1v5胜率)', c5 / a5 if a5 > 0 else 0, 'clutch_rate_1v5', '{:.1%}', count_label=c5 ~ '/' ~ a5) }}
{% set mk_count = (l2_stats.get('k2', 0) or 0) + (l2_stats.get('k3', 0) or 0) + (l2_stats.get('k4', 0) or 0) + (l2_stats.get('k5', 0) or 0) %}
{% set ma_count = (l2_stats.get('a2', 0) or 0) + (l2_stats.get('a3', 0) or 0) + (l2_stats.get('a4', 0) or 0) + (l2_stats.get('a5', 0) or 0) %}
{{ detail_item('Multi-Kill Rate', mk_count / rounds, 'l2_mk', '{:.1%}', count_label=mk_count) }}
{{ detail_item('Multi-Assist Rate', ma_count / rounds, 'l2_ma', '{:.1%}', count_label=ma_count) }}
{{ detail_item('Multi-K Rate (多杀率)', mk_count / rounds, 'total_multikill_rate', '{:.1%}', count_label=mk_count) }}
{{ detail_item('Multi-A Rate (多助率)', ma_count / rounds, 'total_multiassist_rate', '{:.1%}', count_label=ma_count) }}
</div>
</div>