Files
sor/Client
78f55930a0 Fix team play: correct team indices, team-aware unit colors and ownership
Server:
- Add TeamCount, PlayerOneTeamIndex, PlayerTwoTeamIndex to GameSession so
  team assignments survive the lobby→game transition without recomputation
- GameLobbyReadyHandler.StartGameAsync: apply TeamAssignmentsJson (host custom
  reassignments) for all seats; store P1/P2 team indices on the session
- GameReadyHandler N-player path: use session.PlayerOneTeamIndex /
  PlayerTwoTeamIndex instead of hardcoded teamCount=1 (which put both P1 and
  P2 on team 0 in every non-FFA game)
- EF migration: AddGameSessionTeamFields

Client (game_screen.gd):
- _rebuild_ownership: treat same-team allies as friendly instead of enemy
- Unit color loop: use state.teamColors palette per team instead of hardcoded
  blue (self) / red (everyone else)
- _on_game_over: derive i_won from player_outcomes[me].outcome == "Winner" so
  a teammate's final kill correctly shows "Victory!" for the whole team

Also: skip absent hex tiles in BoardTemplateBuilder SVG render

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-04-02 08:40:43 -04:00
..