Add per-turn and per-combat damage sorts; fold damage share into total damage #333

Merged
nelsong6 merged 1 commit from claude/deck-sort-damage-rates into main 2026-09-18 08:22:37 -07:00
nelsong6 commented 2026-09-18 08:22:31 -07:00 (Migrated from github.com)

Summary

  • Damage share folded into Total damage. The two sorts always ordered identically (same denominator for every card), so the Damage share sort is removed and its share now prints under the Total damage caption (589 / 18% of 3271).
  • Avg damage per combat sort: total effective damage ÷ CombatsInDeck (existing field, works on old runs).
  • Avg damage per turn sort: total effective damage ÷ new per-card TurnsInDeck, counted from Hook.AfterPlayerTurnStart (same target as the existing Drain Power patch) for every card in the permanent deck.
    • New additive CombatsWithTurnsInDeck field lets the per-turn average be withheld for cards whose run predates turn counting, instead of dividing all their damage by only their later turns.
  • Matching tooltip rows so hovering corroborates the new sorts.
  • Fixture card-turns-in-deck-run.json + SchemaLoadingTests assertions; primer note.

Verification

Built, deployed and hot-reloaded (Core.Initialize complete). Tests and live behavioral verification not run (user-owned).

## Summary - **Damage share folded into Total damage.** The two sorts always ordered identically (same denominator for every card), so the Damage share sort is removed and its share now prints under the Total damage caption (`589` / `18% of 3271`). - **Avg damage per combat** sort: total effective damage ÷ `CombatsInDeck` (existing field, works on old runs). - **Avg damage per turn** sort: total effective damage ÷ new per-card `TurnsInDeck`, counted from `Hook.AfterPlayerTurnStart` (same target as the existing Drain Power patch) for every card in the permanent deck. - New additive `CombatsWithTurnsInDeck` field lets the per-turn average be withheld for cards whose run predates turn counting, instead of dividing all their damage by only their later turns. - Matching tooltip rows so hovering corroborates the new sorts. - Fixture `card-turns-in-deck-run.json` + `SchemaLoadingTests` assertions; primer note. ## Verification Built, deployed and hot-reloaded (`Core.Initialize complete`). Tests and live behavioral verification not run (user-owned).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
romaine-life/spirelens!333
No description provided.