Commit Graph
210 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
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
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
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
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
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 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
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
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
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
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
9c7dc098aa Fix 3 multiplayer bugs: type error, reconnect, lobby count
- game_screen.gd: fix Parser Error on line 270 — use 'as Environment'
  cast instead of ': Variant' annotation for WorldEnvironment.environment
- Game.gd: auto-resend game.ready on auth_success reconnect so the
  game session is restored when the WebSocket reconnects mid-game
- lobby_browser_row.gd: show real N/Max player count instead of
  hardcoded "1/2" / "2/2"
- CustomLobbyDto: add MaxPlayers, CurrentPlayerCount, GameMode, TeamCount
- GameListCustomLobbiesHandler: compute currentPlayerCount from
  GuestAccountId + AdditionalPlayersJson; pass new fields to DTO

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:05:40 -04:00
9d4302cc6c Client multiplayer: N-player targeting, placement zones, lobby creation, outcomes
Server:
- BoardDto: add StartingZones (seat → coord list) so client knows valid placement tiles
- GameEngine.ToBoardDto: serialize StartingZones into the DTO

Client – Game.gd:
- get_enemy_players(): returns all players not on the local player's team
- get_all_enemy_units(): flat list of field + archSpirit from all enemies
- game_over signal: adds player_outcomes: Array parameter
- game.over push: extracts playerOutcomes array and passes to signal

Client – game_screen.gd:
- _valid_placement_tiles(): uses board.startingZones[seatIndex] when available; falls back to legacy row logic
- _valid_attack_target_coords/ids: use Game.get_all_enemy_units() instead of single opponent
- ability target picker: uses get_all_enemy_units() for enemy units
- player-panel builder (zone abilities): iterates get_enemy_players() for N-player
- _on_game_over: shows per-player rank deltas from playerOutcomes when present

Client – CustomLobby.gd:
- State: max_players, game_mode, team_count fields (cleared on clear_state)
- create(): accepts p_max_players, p_game_mode, p_team_count params; sends to server
- join(): stores max_players/game_mode/team_count from server response
- game.custom.started: calls clear_state() before emitting game_starting

Client – FreePlayScreen:
- Create dialog: MaxPlayersSpinner (2-10), GameModeOption (FFA/Teams/MultiTeam), TeamCountRow (hidden for FFA)
- GameModeOption.item_selected toggles team_count_row visibility
- _on_create_confirmed: passes max_players, game_mode, team_count to CustomLobby.create()

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 06:12:14 -04:00
74af9aa4bd Phase 5: N-player ELO, spectator-for-eliminated, turn-limit/concede N-player paths
- GameEngine: GetNPlayerTurnLimitWinners() ranks surviving players by ArchSpirit HP; highest-HP player(s) win, rest lose
- GameConcedeHandler: N-player path — conceder is loser, remaining non-eliminated players are winners; delegates to FinalizeMultiPlayerGameAsync
- GameForceConcedeHandler: same N-player/1v1 branch split for inactivity forfeit
- GameEndTurnHandler: N-player path uses GetNPlayerTurnLimitWinners + FinalizeMultiPlayerGameAsync on turn-limit game-over
- GameTurnTimerService: same N-player/1v1 branch on timer-expiry game-over
- Game.gd: player_eliminated signal + game.player_eliminated push handler
- game_screen.gd: _on_player_eliminated shows AcceptDialog; sets _is_spectating=true for the local player so they can watch the rest of the game

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 05:56:01 -04:00
356e1a50e3 Phase 3 & 4: Team colors, player_eliminated push, board shapes, lobby team UI
Phase 3 – Team modes:
- GameState: TeamColors dictionary (int → hex color string) populated from palette
- GameMessages: PlayerEliminatedPush, PlayerOutcomeDto, extended GameOverPush
- GameHandlerBase: FinalizeMultiPlayerGameAsync (pairwise ELO), BroadcastPlayerEliminatedAsync, GetAllPlayerIds for N-player push
- GameAttackHandler: snapshot pre-attack elimination state; use FinalizeMultiPlayerGameAsync; push PlayerEliminatedPush for mid-game knockouts
- game_screen.gd: turn order strip chips carry team-color left border from state.teamColors
- lobby_room_screen.gd: _team_label() helper; team badges on host/guest/additional slots

Phase 4 – Board shape library:
- BoardShapeGenerator: AutoShape() picks shape by player count; adds Triangular (3p), RadialStar (5p, 5-arm star), HexRing (6p, hex perimeter zones); CoordsInRect helper
- GameLobbyReadyHandler: auto-selects board shape at game start; passes BoardShape+PlayerCount into rules snapshot

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 05:50:55 -04:00
00bf788ac8 Phase 2 client: N-player HUD, lobby room, and DTO fields
Server:
- PlayerStateDto: add SeatIndex, TeamIndex, IsEliminated
- GameStateDto: add SeatOrder, GameMode
- CreateCustomLobbyResponse / JoinCustomLobbyResponse: add MaxPlayers, GameMode, TeamCount
- GameEngine.ToDto(): populate new fields from GameState / PlayerState
- Handlers: return MaxPlayers, GameMode, TeamCount in lobby create/join ACKs

Client:
- GameScreen.tscn: add TurnOrderStrip HBoxContainer in TopBar
- game_screen.gd: show TurnOrderStrip for >2 player games; _rebuild_turn_order_strip()
  builds per-player chips sorted by seatIndex, highlighting active/eliminated players
- LobbyRoomScreen.tscn: add GameModeLabel, AdditionalPlayersContainer,
  unique_name on FirstTurnSection/FirstTurnBtns
- lobby_room_screen.gd: show game mode + player count; _rebuild_additional_players_panel()
  shows occupied seats and empty waiting slots; hide first-turn buttons for 3+ players;
  _on_guest_joined refreshes full display instead of only updating GuestNameLabel

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 00:14:25 -04:00
f700fd5de6 Implement multiplayer extension: 2-10 players FFA/Team/Multi-Team
Core engine:
- Add SeatIndex, TeamIndex, IsEliminated to PlayerState
- Add SeatOrder, GameMode to GameState with helpers: ActiveSeats(),
  GetNextActiveSeat(), GetEnemyIds(), AreAllies()
- Add StartingZones to Board for per-seat placement validation
- Add BoardShape, PlayerCount to GameRules
- New BoardShapeGenerator: Rectangle (up to 4 seats) + Cross shapes
- N-player Initialize() overload; old 2-player overload delegates to it
- EndTurn uses GetNextActiveSeat() instead of hardcoded GetOpponentId()
- Attack finds target across all enemy players; EliminatePlayer() helper
  allows multi-player elimination without immediate game over
- PlaceArchSpirit validates via StartingZones (legacy row fallback preserved)
- AbilitySystem.Own() uses AreAllies() for team-aware ownership checks

Database:
- GameSession: +player_count, +game_mode, +additional_players_json
- CustomLobby: +game_mode, +team_count, +additional_players_json
- EF migration: AddMultiplayerSlots (applied)

Handlers:
- GameCreateCustomLobbyHandler: honours MaxPlayers/GameMode/TeamCount from request
- GameJoinCustomLobbyHandler: multi-slot join up to MaxPlayers
- GameLobbyReadyHandler: N-player all-ready check; seats/team assignment by mode
- GameReadyHandler: builds N-player list from AdditionalPlayersJson
- GameHandlerBase.LoadActiveSessionAsync: recognises additional players

Client:
- Game.gd: get_opponents() returns all non-local players;
  get_opponent() kept as backward-compat alias returning first opponent

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-25 23:57:36 -04:00
dingo a023d6ff94 ui improvements 2026-03-25 23:02:42 -04:00
ff973ce9c3 Add slow skybox rotation to 3D scene and 2D scene backgrounds
3D (game_screen): _process increments env.sky_rotation.y at 0.026 rad/s
(~4 min per full revolution) — works for all sky types (panoramic,
animated panoramic, cubemap shader) via Godot's built-in EYEDIR transform.

2D (ContentCache): apply_scene_background attaches a canvas_item ShaderMaterial
to the background TextureRect that horizontally scrolls UV.x using the built-in
TIME uniform at 0.004 UV/s (matching the ~4 min cycle) — no GDScript tick needed.

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-25 20:31:27 -04:00
70f0089b2f Fix cubemap face loading: direct HTTP + array-wrapped pending counter
- Remove ContentCache.load_texture_async for cubemap faces; ImageTexture.get_image()
  silently returns null in some Godot 4 builds, leaving all images[] null
- Fetch each face directly with HTTPRequest (same pattern as _load_static_skybox),
  keeping raw Image objects — no GPU round-trip
- Wrap `pending` in Array[1] so closures always capture a reference, not a
  stale copy of the int (GDScript 4 primitive closure-capture is unreliable)
- Log warning per face on download or decode failure

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-25 18:47:27 -04:00
83a4346824 Fix cubemap skybox: typed array, size normalization, error check, sync _skybox_sky
- Use Array[Image] for create_from_images() (plain Array causes runtime type error)
- Detect face size from first valid image; resize mismatched faces to match
- Fill missing faces with correctly-sized black placeholder (was 1x1, caused
  dimension mismatch when mixed with real faces)
- Check error return from create_from_images and bail on failure
- Update _skybox_sky after cubemap applied so _setup_procedural_sky can clean up

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-25 17:57:06 -04:00
843660dfce Implement cubemap skybox, multi-active skyboxes, and 2D scene backgrounds
- Server: Add SkyboxType + 6 CubeUrl fields to SkyboxDefinition entity
- Server: EF migration AddSkyboxCubemapType
- Server: GetSkyboxConfigResponse now returns array of all active skyboxes
- Admin: SkyboxManagerPage supports Panoramic/AnimatedPanorama/Cubemap types,
  6 face URL fields for cubemap, and independent per-skybox active toggle
- Client: ContentCache fetches + caches skyboxes; adds get_random_skybox,
  get_skybox_bg_url, load_texture_async, apply_scene_background helpers
- Client: game_screen replaces _fetch_skybox with ContentCache-based approach;
  adds _load_cubemap_skybox / _apply_cubemap_images / _apply_cubemap_material
- Client: 12 2D scene scripts call ContentCache.apply_scene_background(self)
  in _ready() to replace solid-color backgrounds with CDN skybox images

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-25 16:11:02 -04:00
453f008620 Fix rejoin opponent GUID + CDN skybox null/logging
- GameReadyResponse: add OpponentDisplayName? (populated only on AlreadyStarted)
- GameReadyHandler: inject SorIdentityDbContext; fetch opponent display name when
  session is already Active so rejoining clients get the name immediately
- Game.gd: on AlreadyStarted ack, read opponentDisplayName and set Game.opponent_name
  before calling _fetch_state() — fixes opponent showing as GUID on rejoin
- game_screen.gd: replace typed-Dictionary null assignment with safe Variant check
  to avoid silent GDScript coercion when no skybox is configured; strip query-string
  from URL before extension check (_fetch_skybox); add print logging throughout CDN
  skybox flow to surface download/decode failures

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-25 15:03:35 -04:00
Shard 85e9b63579 Fix account mailbox: load notifications, open threads, reply, mark read, delete 2026-03-25 18:42:36 +00:00
Shard 4cc7a828ad Implement useful account mailbox with thread view, reply, and delete 2026-03-25 18:40:40 +00:00
Shard e2488d3030 Fix chat notifications visibility and mark-read actions in overlay 2026-03-25 18:19:20 +00:00
dingo f679fd3828 UI + Chat fix 2026-03-25 14:14:20 -04:00
dingo eaa078269f Cleaning up dead comments 2026-03-25 14:00:52 -04:00
dingo e56a35b154 Bazaar and leaderboard bug fixes 2026-03-25 14:00:06 -04:00
0ace4d247b Fix free game: display names in lobby/game screen + rules fallback
- CustomLobbyGuestJoinedPush: add GuestDisplayName (host now sees guest's real name)
- JoinCustomLobbyResponse: add HostAccountId/Name + GuestAccountId/Name so guest
  lobby room shows correct state instead of "Waiting for guest…"
- CustomLobbyGameStartedPush: add OpponentDisplayName so game screen shows name not GUID
- GameJoinCustomLobbyHandler: use 3-tier rules fallback (lobby override → db custom-default
  → hard-coded default) matching StartGameAsync, fixing inconsistent rule display on join
- GameLobbyReadyHandler: inject SorIdentityDbContext, fetch display names for both
  players before pushing game.custom.started
- CustomLobby.gd: set Game.opponent_name on game.custom.started push; emit display
  names in guest_joined and game_starting signals; patch join response lobby dict
- lobby_room_screen.gd: use display name in _on_guest_joined; update _on_game_starting signature

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-25 12:14:14 -04:00
2a15bd2eb3 Fix crashes, add ModifyAttackRange effects, ArchSpirit swap in deck editor
- Bazaar Deck tab crash: null-safe float conversion for usdPrice in store_item_row.gd
- Leaderboard crash: freed-object guard in _on_leaderboard_ok (is_instance_valid check)
- Add ModifyMinAttackRangeEffect / ModifyMaxAttackRangeEffect with clamp-to-0 and correct reversal tracking
- AbilityBuilder: add new range effects to Stat Modification group + _amountOnlyTypes
- collection.set_arch_spirit: new handler, request record, and service registration
- Deck editor: show Tier-1 commander row with Change button + ArchSpirit picker panel

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-25 11:25:44 -04:00
dingo 2b7b6aa2ba Fixed but in AbilitySystem for resolving affinity 2026-03-23 13:55:36 -04:00
a46be8e06c Init screen: loading bar + version check hang fix
Replace the sync card count with a ProgressBar that pulses
indeterminately during version check, then fills 5→85% during
content sync, 90% during active-session check, 100% on done.

Add an 8-second timeout on version.check so a silent server-side
hang (server receives packet but never replies) auto-proceeds to
sync instead of freezing the init screen indefinitely.

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-23 12:14:42 -04:00