Commit Graph
408 Commits
Author SHA1 Message Date
bd59904ce2 Add Decagonal board shape, team reassignment, and multiplayer considerations
- BoardShapeGenerator: add MakeDecagonal() for 7-10 players (10-armed
  radial, 11x11 arena, 21x21 total); AutoShape now routes 7-10 to Decagonal
- CustomLobby: add TeamAssignmentsJson (seat -> team override map)
- GameMessages: add ReassignTeamRequest/Response, LobbyTeamAssignmentChangedPush,
  SeatTeams field on JoinCustomLobbyResponse
- GameReassignTeamHandler: new game.custom.reassign_team handler (host-only);
  pushes team_reassigned to all participants including additional players
- EF migration: AddTeamAssignmentsToLobby (applied to pg-forge-01)
- Client CustomLobby.gd: seat_teams state, reassign_team() action, push handler
- lobby_room_screen.gd: _rebuild_team_controls() renders host-only [<] Tx [>]
  cycle buttons per seat in team modes; _team_label() reads seat_teams overrides
- OVERALL.md: add Considerations for Later (fog of war, asymmetric teams, ranked ELO)

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-03-28 15:18:53 -04:00
450c71544d Fix nil crash: int(null) on currentHealth in damage animations
unit.get("currentHealth", 0) returns null when the key exists with a
null value; int(null) has no valid constructor in GDScript 4.
Use explicit null check before casting.

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-03-28 12:05:57 -04:00
04ad45d0f7 Fix nil crash when clicking card with null abilitiesJson
card.get("abilitiesJson", "") returns null when the key exists but
the server sent null — the default only fires for absent keys.
Assigning null to a typed String variable throws in GDScript 4.

Use an explicit null check instead of relying on the dict default.

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-03-28 11:39:58 -04:00
66b116b5e0 Fix bool crash in _play_damage_animations (GDScript or operator)
GDScript 4's `or` is a logical operator that returns bool, not the
left/right value like Python. `player.get("archSpirit") or {}` was
putting true/false into the iteration array instead of the dict,
causing `is_empty` to fail with 'base bool'.

Replace with an explicit null check:
  var _arch_list = [] if arch_raw == null else [arch_raw]

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-03-28 11:30:09 -04:00
ba898f610a Filter channel tile highlights to matching affinity only
Spirits may only be channeled onto tiles whose resolvedAffinity
matches the card's affinity. Previously all unoccupied in-range tiles
were highlighted regardless of affinity.

Also:
- Cache Game.get_tile() result to avoid double lookup per cell
- Add sparse-board guard (_tile_bodies existence check)
- Remove stray debug print statements

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-03-28 11:12:39 -04:00
683d61e35d Gate prebuilt deck purchases on IsAvailableInShop flag
- Add IsAvailableInShop to the buy query so decks not marked for sale
  cannot be purchased directly by ID (store listing already filtered
  this, but the buy endpoint did not)
- Remove the unconditional starter-deck block; IsAvailableInShop is
  now the single gate — if an admin explicitly marks a starter deck
  as available in shop it can be purchased like any other deck

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-03-28 10:29:51 -04:00
883543d8de Fix nil crash in _play_damage_animations on player concede
When a player is eliminated, the server sends archSpirit: null.
player.get("archSpirit", {}) returns null (not {}) when the key
exists but its value is null — the default only fires for missing
keys. GDScript then throws assigning null to unit: Dictionary.

Use `player.get("archSpirit") or {}` which coerces any falsy value
(null, missing key) to an empty dict before building the iteration
array.

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-03-28 10:20:07 -04:00
9bf2d83457 Fix board template ID key mismatch between client and server
The client sends 'boardTemplateIdOverride' but the server DTO had the
property named 'BoardTemplateId' (serializes to 'boardTemplateId').
The JSON key mismatch caused the server to always receive null, so
lobby.BoardTemplateIdOverride was never set and the auto-shape ran.

Rename BoardTemplateId → BoardTemplateIdOverride throughout
CustomRulesOverride and CustomRulesDto to match the client's key.

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-03-28 10:10:43 -04:00
f57d1846c9 Wire BoardTemplateId through lobby rule DTOs and handlers
CustomRulesOverride and CustomRulesDto both lacked a BoardTemplateId
field, so the client's template selection was never received or stored.
lobby.BoardTemplateIdOverride always remained null, boardTemplateJson
was never built, and the auto-shape generator ran instead of the
template.

- CustomRulesOverride: add Guid? BoardTemplateId
- CustomRulesDto: add Guid? BoardTemplateId (default null for compat)
- GameCreateCustomLobbyHandler: save BoardTemplateIdOverride on create;
  thread boardTemplateId through ToDto()
- GameUpdateLobbyRulesHandler: save BoardTemplateIdOverride on update
- GameGetLobbyHandler, GameJoinCustomLobbyHandler,
  GameListCustomLobbiesHandler, GameListActiveLobbiesHandler:
  include BoardTemplateId in outgoing DTOs

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-03-28 09:43:23 -04:00
225a16e4a3 Fix board template being ignored when set on default ruleset
The lobby ready handler only checked lobby.BoardTemplateIdOverride and
never fell back to dbDefaults.BoardTemplateId, so templates configured
on the admin default GameRuleSet were silently skipped and the
auto-shape generator ran instead.

Apply the same override → default fallback chain as all other rules:
  effectiveTemplateId = lobby.BoardTemplateIdOverride ?? dbDefaults?.BoardTemplateId

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-03-27 23:15:45 -04:00
4138ba39e7 Add empty-tile support to board template builder
- SnapshotTile: add IsAbsent flag (JSON: "absent")
- BoardShapeGenerator.FromTemplate(): absent tiles are removed from
  the tiles dict instead of being filled with Void+Void, producing
  sparse board layouts with genuine missing cells
- Builder: Empty swatch in paint palette marks cells as absent
  (striped crosshatch visual); absent cells are excluded from zone
  assignment; PureVoid paint clears absent state back to valid void;
  ApplyModal() also clears IsAbsent; SerializeTiles() includes absent
  entries so they round-trip correctly through save/load

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-03-27 22:15:31 -04:00
c4177257ef Support sparse (non-rectangular) boards and N-player camera
Sparse board fixes:
- _bfs_path: skip neighbour tiles not present in _tile_bodies (e.g. Cross
  arm corners), preventing movement through void gaps on non-rectangular boards
- _valid_move_tiles: same tile-existence guard before adding candidates
- _attack_range_tiles: same guard for ranged-reach highlights

Camera improvements:
- Auto-scale _cam_distance from board size (max_dim × 1.5, clamped 12–30)
  so RadialStar, HexRing and other large boards are fully visible on load
- Camera orientation now uses board.startingZones centroid to derive yaw for
  any seat index, enabling correct "look from behind" for seats 2–5 in Cross,
  Triangular, RadialStar, and HexRing layouts; falls back to P1/P2 logic when
  zones are absent (legacy 1v1 games)
- Pan limits scale with board size (board_half_extent clamped 6–20) instead
  of hardcoded ±6 world units, allowing full pan across large boards

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-03-27 22:06:40 -04:00
3517ee30b5 Fix affinity logic and wire BoardTemplateCache init fetch
Builder (BoardTemplateBuilderPage):
- ComputeDisplayAffinity: rewritten to exactly mirror AffinitySystem.Resolve.
  Was reversed on gateway direction ((Void,Basic)→Gateway, (Basic,Void)→Basic)
  and silently returned Void for (Void,Aether) instead of UnstableAether.
- PaintMap: corrected B1/B2 slot assignments to match AffinitySystem.Decompose:
  basics now use (Void,Basic), gateways use (Basic,Void), UnstableAether and
  Aether both use canonical (Void,Aether).

Client (init_screen):
- Fire BoardTemplateCache.fetch() in parallel with ContentCache.start_sync()
  so the template list is populated before the player reaches a lobby screen.

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-03-27 21:23:23 -04:00
5b836a8e7f Implement phase-3 board template client integration
Server:
- Add GetBoardTemplatesRequest/Response + BoardTemplateDto to ContentMessages.cs
- ContentBoardTemplatesHandler: content.board_templates → returns all enabled
  templates (id, name, dimensions, player range, flags, tilesJson, startingZonesJson)
- Register AddGameDatabase + ContentBoardTemplatesHandler in SOR.Content

Client:
- BoardTemplateCache.gd autoload: fetches content.board_templates on demand,
  exposes get_templates_for_custom(), get_templates_for_ranked(), get_template_by_id()
- rules_editor_dialog.gd: add Board Template OptionButton in the BOARD section;
  uses _option_ids map so confirmed() emits the template GUID (not label text)
- project.godot: register BoardTemplateCache autoload

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-03-27 21:12:49 -04:00
1368083405 Implement phase-2 board template engine integration
- Add BoardTemplateJson (nullable string) to GameRules so admin-defined
  board layouts are snapshotted at session creation; in-flight games are
  unaffected by subsequent template edits.
- Introduce BoardTemplateSnapshot + SnapshotTile types in SOR.Game.Grid
  (integer-enum serialisation matching the admin builder).
- BoardShapeGenerator.FromTemplate / FromTemplateJson: build a Board from
  a snapshot, respecting AffinityOverrideable + StartingRandomTilePct.
- GameEngine.Initialize: use FromTemplateJson when BoardTemplateJson is set,
  falling back to algorithmic Generate.
- GameLobbyReadyHandler: load BoardTemplateIdOverride template from DB and
  embed as BoardTemplateJson in the rule snapshot at lobby start.
- MatchmakerService: load BoardTemplateId template from DB and embed via
  JsonElement in the ranked-rule snapshot at match creation.

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-03-27 21:03:05 -04:00
4924f61483 Implement board template builder — Phase 1 admin panel
- New BoardTemplate entity (TilesJson/StartingZonesJson as jsonb)
- BoardTemplateIdOverride on CustomLobby, BoardTemplateId on GameRuleSet
- EF migration AddBoardTemplates + applied to pg-forge-01
- Admin list page: /game/board-templates (toggle enable, edit, delete)
- Admin builder: paint canvas (22-affinity palette, drag support),
  zone edit mode (per-player-count seat assignment, erase), tile flags modal
- NavMenu: Board Templates link under Game submenu
- GameRules: BoardShape default changed to "Default"

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-03-27 20:49:32 -04:00
Shard 8f0ed9d68f Implement phase-3 adjacency, movement-state, and tile-control ability primitives 2026-03-27 17:58:02 +00:00
Shard e887a8c670 Implement phase-2 prevention/replacement triggers and sequence duration 2026-03-27 17:44:31 +00:00
Shard 9e4fbd12a7 Add phase-1 ability primitives and builder support 2026-03-27 15:40:57 +00:00
Shard a656c701c0 Handle nullable spectator arrays in Game getters 2026-03-27 14:25:00 +00:00
Shard e5a9bde653 Guard archSpirit nil in game ownership/render loops 2026-03-27 14:17:24 +00:00
Shard 8736217241 Harden multiplayer rejoin and eliminate-concede cleanup semantics 2026-03-27 14:06:50 +00:00
Shard 6d20af8c1a Include additional players in active-session rejoin detection 2026-03-27 13:45:45 +00:00
dingo de3c62e1e5 Missed a typeing 2026-03-27 09:27:33 -04:00
Shard bf9e0591af Fix delta arch-spawn propagation and viewer private lookup 2026-03-27 13:10:08 +00:00
Shard cb024c70e2 Cut over game.state_delta to account-scoped multiplayer schema 2026-03-27 12:42:57 +00:00
Shard f07ea4135a Refocus Delta-updates plan on full cutover of current delta system 2026-03-27 12:27:44 +00:00
Shard bd640c1eee Add Delta-updates design plan for multi-player state deltas 2026-03-27 12:02:58 +00:00
dingo d2575837ab missing comma 2026-03-27 06:13:54 -04:00
Shard 775b30d8a4 Make custom lobby leave idempotent for stale lobby IDs 2026-03-27 03:07:44 +00:00
Shard c2e19a38fe Fix game.ready state handling regression 2026-03-27 02:25:05 +00:00
Shard a84313e08d Improve 3+ lobby ready UX with explicit self/others status 2026-03-27 01:23:22 +00:00
Shard d7aa61a9ad Harden lobby/game ready flow for out-of-order joins and stale clicks 2026-03-27 01:02:26 +00:00
Shard 32aa8165bb Fix 3+ player custom lobby state/ready sync 2026-03-27 00:47:48 +00:00
Shard 4737d337fa Fix triangular board compile error (nested Math.Max) 2026-03-26 23:08:45 +00:00
Shard 532ea81698 Rework triangular board to equidistant corner starts 2026-03-26 23:05:37 +00:00
Shard 3c8614c476 Fix sparse-board adjacency lookup for non-rectangular shapes 2026-03-26 22:57:14 +00:00
Shard c8feeb9d5b Fix board shape resolution and implement true triangular footprint 2026-03-26 22:47:10 +00:00
e9097214fb Fix 3rd-player lobby ready-up and board shape fallback
3rd-player ready-up (two root causes):
- Server: LobbyReadyStatusPush to additional players was deserialized
  without PropertyNameCaseInsensitive, so after the 3rd player readied
  (converting JSON to camelCase) all subsequent pushes went to Guid.Empty
  → 3rd player never received ready/start notifications
- Client: ready_status push handler treated all non-hosts as "guest",
  so i_am_ready was incorrectly set from guestReady for additional players
  → their ready state was clobbered every time host/guest readied
- Server: JoinCustomLobbyResponse now includes IsAdditionalPlayer flag
  so the client can correctly distinguish guest from 3rd+ player

Board shape fallback:
- GameEngine.cs 2-player overload and GameReadyHandler N-player path both
  now treat "Default"/null BoardShape as AutoShape(playerCount) rather than
  hardcoded "Rectangle", fixing old sessions and ranked matches

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-03-26 16:00:15 -04:00
cf473d812c Fix board shapes, spectator-stuck, and display name on reconnect
- GameEngine.cs: 2-player Initialize overload was hardcoding "Rectangle"
  regardless of rules.BoardShape — now uses rules?.BoardShape ?? "Rectangle"
- game_screen.gd: _on_player_eliminated was setting _is_spectating but not
  calling _setup_spectator_ui(), leaving eliminated players with no Leave button
- GameGetStateHandler.cs: on reconnect (game.get_state), populate missing
  display names from identity DB so old/reconnected sessions show real names
  instead of truncated account IDs

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-03-26 15:37:39 -04:00
dingo bf503da279 Setting a Variant 2026-03-26 15:17:49 -04:00
8b0490687e Add boardShape to client rules editor + ability builder help docs
- rules_editor_dialog.gd: add add_option helper, boardShape OptionButton
  in BOARD section (Default/Rectangle/Cross/Triangular/RadialStar/HexRing),
  and OptionButton branch in _on_confirm
- lobby_room_screen.gd: add boardShape to both rules display dicts
- AbilityBuilder.razor: add help docs for OnUnitSentToDiscard CausedBy field
- GameDbContextModelSnapshot.cs: reflect AddBoardShapeOverride migration

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-03-26 15:01:36 -04:00
766ba336ec Add BoardShape to custom lobby rules with 'Default' (auto by player count)
- CustomLobby: add BoardShapeOverride (null/"Default" → AutoShape at game start)
- CustomRulesOverride: add optional BoardShape string field for lobby creation/update
- CustomRulesDto: add BoardShape field exposed to clients ("Default" | shape name)
- GameCreateCustomLobbyHandler: store + pass BoardShapeOverride; ToDto gains
  optional boardShape param so shape is reflected in the creation response
- GameGetLobbyHandler / GameJoinCustomLobbyHandler / GameListCustomLobbiesHandler
  / GameListActiveLobbiesHandler: all pass lobby.BoardShapeOverride to ToDto
- GameUpdateLobbyRulesHandler: store BoardShapeOverride when rules are edited
- GameLobbyReadyHandler: resolve boardShape — use explicit override when set,
  otherwise fall back to BoardShapeGenerator.AutoShape(playerCount)
- EF migration AddBoardShapeOverride: adds board_shape_override column

Valid BoardShape values: null | "Default" | "Rectangle" | "Cross" |
  "Triangular" | "RadialStar" | "HexRing"

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-03-26 11:02:44 -04:00
7b1e7e346a Show display names everywhere accountId was shown in GameScreen
Server:
- PlayerState: add DisplayName property (populated from identity DB)
- PlayerStateDto: add DisplayName field (falls back to truncated ID)
- GameEngine.ToDto: include DisplayName in player DTO
- GameReadyHandler: resolve display names from identity DB after state
  initialization so every subsequent state push carries them

Client:
- Game.gd: add get_display_name(account_id) helper — reads displayName
  from player state, falls back to substr(0,8)
- game_screen.gd: replace all 5 pid/eid/elim_id.substr(0,8) UI sites
  with Game.get_display_name() — HUD opp name, turn order strip,
  game-over outcome list, discard scope selector, elimination dialog
- Turn order strip chips: use resolved display name; add mouse_filter
  STOP + tooltip_text showing SP/ST/Hand/Deck for opponent chips on hover

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-03-26 10:52:08 -04:00
dingo a50b60ad82 Merge branch 'main' of https://git.aeternalisgames.com/dingo/SOR
multiple workers.
2026-03-26 10:33:07 -04:00
Shard 84284be4d0 Fix active ability target gating for server-resolved ownership scopes 2026-03-26 14:32:31 +00:00
6465607eb0 Fix FFA last-man-standing and nil attack-target crash
- GameEngine.Concede: use EliminatePlayer instead of unconditionally
  setting GamePhase.GameOver — FFA game continues until one team remains.
  Return value changed to (GameState, bool gameOver) tuple.
- GameConcedeHandler / GameForceConcedeHandler: check gameOver flag;
  when game continues push BroadcastPlayerEliminatedAsync + state update
  instead of calling FinalizeMultiPlayerGameAsync prematurely.
- game_screen.gd _valid_attack_target_coords: use `not (_tpos is Dictionary)`
  guard instead of typed assignment — prevents nil crash when eliminated
  players' units still appear in get_all_enemy_units() with position:null.

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-03-26 10:27:12 -04:00
cabadfc647 Fix N-player game.ready: per-player ready tracking and deck deserialization
- GameReadyHandler: change `else` → `else if (P2)` so Player 3+ no
  longer incorrectly marks PlayerTwoReady; additional players now track
  their own IsReady flag inside AdditionalPlayersJson on the session.
  All-ready check now waits for P1 + P2 + all additional players.
- GameLobbyReadyHandler.StartGameAsync: add PropertyNameCaseInsensitive
  when deserializing AdditionalPlayersJson → prevents Guid.Empty deck IDs
  caused by camelCase/PascalCase mismatch between join and ready handlers.
- SessionAdditionalPlayer: add IsReady property to support per-player
  ready tracking in the N-player game.ready flow.

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-03-26 10:08:19 -04:00
7fd5beb172 Fix 2-player placement zone and game.over null crash
BoardShapeGenerator: 2-player rectangle now assigns one row per seat
(row 0 for seat 0, top row for seat 1), restoring the original 1v1
behaviour.  3-4 player lobbies keep the two-row zones for extra
placement room.

Game.gd game.over: server sends playerOutcomes:null for 2-player games.
d.get(key, default) returns null when the key exists with value null,
so 'null as Array' crashed.  Use 'is Array' guard to safely fall back
to an empty array when the field is absent or null.

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-03-26 09:22:14 -04:00
497e1c3172 Fix N-player lobby: premature start, unready for seat 3+, stale reconnect
GameLobbyReadyHandler: change else→else if (isGuest) so additional
players (seat 3+) no longer incorrectly set GuestReady=true.  When
Player 3 called ready the else-branch marked GuestReady, making the
all-ready check fire as soon as the host was also ready — starting
the game without Player 2 ever clicking ready, leaving 2/3 clients
in a starting state and 1 stuck in the lobby.
Also: update DeckId for additional players in AdditionalPlayersJson;
push ready_status to additional player connections.

GameUnreadyHandler: handle additional players (seat 3+) by updating
isReady in AdditionalPlayersJson via JsonNode; push unready status to
all participants including additional players.  Previously threw
NOT_IN_LOBBY for anyone beyond the primary guest.

Game.gd: guard _on_auth_reconnect with 'state is non-empty' so stale
session_id values from ended games don't trigger spurious game.ready
calls.  Also clear session_id in the game.over handler so it never
lingers past the end of a session.

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-03-26 09:18:45 -04:00