feat: combat stats backend + frontend (Mag-Tools style)
Backend:
- db_async.py: new combat_stats + combat_stats_sessions tables
- main.py: combat_stats message handler with DB upsert (lifetime +
session snapshots), in-memory live_combat_stats dict, broadcast
to browser clients.
- REST: GET /combat-stats and GET /combat-stats/{character_name}
Frontend:
- index.html: new "Combat Stats" sidebar link
- script.js: full Combat Stats window with two panels:
- Top: monster list (name, kills, dmg recv, dmg given) with
clickable rows and "All" aggregate, matching CombatTrackerGUI.cs
- Bottom: damage breakdown grid matching CombatTrackerGUIInfo.cs
layout — element × attack type matrix (Mel/Msl + Magic columns),
Attacks (hit%), Evades (%), Resists (%), A.Surges (%), C.Surges (%),
normal Avg/Max, Crits (%), Crit Avg/Max, Total Damage.
- Session / Lifetime toggle button
- style.css: combat-stats-toggle styles
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
da4e840581
commit
c03b1c19f2
5 changed files with 509 additions and 0 deletions
|
|
@ -111,6 +111,13 @@
|
|||
🤝 Vital Sharing
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Combat Stats link -->
|
||||
<div class="quest-status-link">
|
||||
<a href="#" id="combatStatsBtn" onclick="showCombatStatsWindow()">
|
||||
Combat Stats
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Container for sort and filter controls -->
|
||||
<div id="sortButtons" class="sort-buttons"></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue