Skip to content

Playtest fixes — event grouping, target-type toggle, cameo cap, RoundSummary#10

Merged
emp3thy merged 8 commits into
mainfrom
fix/playtest-events-summary
May 17, 2026
Merged

Playtest fixes — event grouping, target-type toggle, cameo cap, RoundSummary#10
emp3thy merged 8 commits into
mainfrom
fix/playtest-events-summary

Conversation

@emp3thy

@emp3thy emp3thy commented May 17, 2026

Copy link
Copy Markdown
Owner

Summary

Six fixes found while play-testing the Phase 4c slice 2 build — events display, launch targeting, and the round-summary "newspaper" page.

  • Group repeated build events — the events screen showed "builds 1 small warhead" once per build. A new src/ui/util/eventGrouping.ts (groupPhaseEvents) counts builds per (leader, item) and renders "builds 3 small warheads". Aggregates by key rather than collapsing adjacent runs, so the human's interleaved build clicks group the same as the AI's item-grouped buildToward output.
  • Sum impacts per attacker — the events screen now collapses multiple ImpactPeople/ImpactInfrastructure hits from one attacker on one target into a single "Carnage ─ 6M deaths (from IL)" line.
  • Target-type toggle bug — flipping a target's people/infra toggle did not rewrite the targetType of launches already queued at that target, so a strike could land as people after the player switched to infra. The toggle now retargets every queued launch for that leader.
  • Cameo cap — the "FROM CLACTON" Disparage cameo rolled per impact (~17.5% each), so multi-impact rounds produced several. Capped at one per round.
  • RoundSummary subhead — reported the single largest strike instead of the per-attacker total ("for 6M" when the player hit for 12M across two strikes). Now sums deaths per attacker→target pair.
  • RoundSummary stats — each leader's row on the round-summary page now shows population and factory counts (👥 25M · 🏭 8).

Test Plan

  • npx tsc --noEmit — clean
  • npm run test:run — 298/298 pass across 43 files (13 new tests: event grouping, the target-type retarget, the cameo cap, the subhead summing)
  • Cameo-cap test confirmed red before the fix

🤖 Generated with Claude Code

@github-actions github-actions Bot 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.

🔴 Claude BugBot Analysis

Found 1 potential bug in this PR.

medium: 1

One bug found: the plan document's chump planner spec code omits the ?. optional chain operator when reading .alive from state.leaders[t], inconsistent with all other planners and risking a TypeError if any cast member's leader record is undefined. All other actual source code changes (cameo cap in resolution.ts, event grouping utilities, target-type retargeting in Planning.tsx, pickSubhead aggregation) are correct.

Comment thread docs/superpowers/plans/2026-05-17-phase-4c-slice2-ai-aggression.md
@emp3thy
emp3thy merged commit 4d6286e into main May 17, 2026
1 check passed
@emp3thy
emp3thy deleted the fix/playtest-events-summary branch May 17, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant