Skip to content
This repository was archived by the owner on Sep 20, 2026. It is now read-only.

fix(combat-insights): keep native count controls internal - #325

Merged
pengx17 merged 1 commit into
masterfrom
codex/hide-combat-impact-count-controls
Sep 5, 2026
Merged

pengx17 merged 1 commit into
masterfrom
codex/hide-combat-impact-count-controls

Conversation

@pengx17

@pengx17 pengx17 commented Sep 5, 2026

Copy link
Copy Markdown
Member

Context

Combat Impact 在原始统计和事件明细次数不一致时,会把两套次数同时显示,例如 Haste ×23 · 69s · 24 cards affected,让玩家误以为加速影响了 24 张不同卡牌。

协作过程

用户指出截图中的统计含义不清,并要求核对实际数据。已读取对应本地回放:Vocoder 有 23 条加速事件,影响 4 张卡牌,分别为 Guzheng 9、Shredder 6、Turner 5、Razor Bow 3;23 次 Tempo 消耗都在下一帧对应一次加速。原始 HastedCardsCount 为 24,同一张卡最近连续 7 场均比事件数多 1。用户确认这类内部核对数字无需展示,并要求检查同类文案。

方案讨论

不根据字段名把原始计数解释成不同卡牌数,也不靠减 1 修正原始数据。统一移除主行追加的原始次数,包括 cards affectedapplications/生效 N 次,避免同一行出现两套计数。

最终方案

  • 主行保留事件次数和游戏效果数值或时长,示例变为 Haste ×23 · 69s
  • 内部计数、对账记录、目标明细及伤害、治疗、护盾总量保持原有语义。
  • 更新现有中英文格式化用例,并修正 ADR-0008 中把内部诊断信息展示给玩家的过时规定。

验证情况

  • 基于最新 master 的独立分支完成 Release 编译及整个 PostCombatImpact.Tests:300 项通过。
  • 核对实际回放的加速事件、Tempo 消耗、逐帧状态变化以及相邻战斗原始统计。
  • CSharpier 格式化和 git diff --check 通过。

已知局限 / 后续工作

原始计数多 1 的生产端原因尚未确定,本 PR 仅清理玩家界面的计数呈现。未部署本地游戏,未进行游戏内视觉复验。

Copilot AI lite review requested due to automatic review settings September 5, 2026 02:47
@pengx17
pengx17 merged commit a3c416e into master Sep 5, 2026
1 check passed
@pengx17
pengx17 deleted the codex/hide-combat-impact-count-controls branch September 5, 2026 02:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The formatter change matches the stated UI contract, and the updated tests and ADR align with the new behavior.

Pull request overview

This PR updates the PostCombatImpact metric tooltip formatting to avoid presenting native/internal application-count controls as player-facing copy when they disagree with the event ledger count, keeping the UI focused on gameplay-relevant numbers.

Changes:

  • Remove the formatter path that appended a second count string (e.g., applications / cards affected) for ApplicationCount authoritative metrics.
  • Update formatter tests to assert that only the observed effect count and gameplay value/duration are shown.
  • Update ADR-0008 to reflect that application-count controls and accounting diagnostics remain internal-only.
File summaries
File Description
tests/PostCombatImpact.Tests/CombatImpactMetricFormatterTests.cs Updates expectations to ensure tooltips no longer append authoritative application-count strings.
src/BazaarPlusPlus/Game/PostCombatImpact/Data/CombatImpactMetricFormatter.cs Simplifies Group() formatting so ApplicationCount authoritative metrics don’t add player-facing “applications/cards affected” text.
docs/adr/0008-combat-impact-accounting-contract.md Documents the updated contract: native count controls and reconciliation diagnostics are not player-facing.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants