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
Merged
Conversation
There was a problem hiding this comment.
🟢 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) forApplicationCountauthoritative 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 affected和applications/生效 N 次,避免同一行出现两套计数。最终方案
Haste ×23 · 69s。验证情况
master的独立分支完成 Release 编译及整个PostCombatImpact.Tests:300 项通过。git diff --check通过。已知局限 / 后续工作
原始计数多 1 的生产端原因尚未确定,本 PR 仅清理玩家界面的计数呈现。未部署本地游戏,未进行游戏内视觉复验。