- init_screen.gd: handle null sessionId from game.get_active_session.ack
properly — str(null)="<null>" which passed the is_empty() check causing
every player to see "active game in progress (null phase)" on login
- CustomLobby.gd: call clear_state() at the start of create() and join() so
that i_am_ready/partner_ready are reset between lobbies — fixes players
appearing instantly ready when entering a new lobby after a previous game
- game_screen.gd: in _setup_spectator_ui(), hide _settings_btn (prevents
accessing the Concede button) and add a programmatic "Leave" button that
calls Game.stop_spectating() and navigates back to FreePlayScreen
- CustomLobbiesPage.razor: add Cancel button (admin) for Open/Full lobbies;
directly sets Status=Cancelled and refreshes the list
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>
- GameLeaveCustomLobbyHandler: return success silently for Started/Cancelled
status (allows the Leave button to work regardless of lobby state); inject
IClientPush and send LobbyPartnerLeftPush to remaining participant when
someone leaves a Full lobby; reset ready flags when guest leaves
- GameMessages: add LobbyPartnerLeftPush(LobbyId, Reason)
- CustomLobby.gd: add partner_left signal; handle game.custom.lobby.partner_left
push by calling clear_state() then emitting partner_left
- lobby_room_screen.gd: connect/disconnect partner_left; show toast + navigate
back to FreePlayScreen when partner leaves
- free_play_screen.gd: extract auto-select into _auto_select_deck() helper to
fix GDScript parse error (comma inside multi-line if-body within lambda)
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>
- Cache _all_decks from server; auto-select first deck on load
- Join flow: if multiple decks, show inline deck-picker dialog
before proceeding to password prompt / join
- Remove stub _get_first_deck_id() (was always returning "")
- _populate_create_deck_buttons now uses _all_decks cache and
auto-presses first button to reflect the default selection
- Guard in _do_join: show alert if _selected_deck still empty
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>
Client: Repentance/Instinct cards with Active abilities in abilitiesJson now
enter ABILITY_TARGET mode instead of sending play_card immediately. Units on
matching tile affinities (IsOnTileWithAffinity) are highlighted in blue; the
player clicks a target unit and the card is sent with the selected unit target.
Server: FireCardEffects now also processes Active abilities from AbilitiesJson
(after the existing EffectsJson path). Source-side ActivationConditions are
checked; target-side conditions (Subject=Target) are trusted from the client.
New Game.gd helper: send_play_card_with_targets sends play_card with a targets
array so the server can route unit selections to the active ability handler.
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>
PureVoid tiles are meant to appear as empty floating platforms — attaching
stalagmite decoration below them breaks the visual. The affinity is checked
at the start of _try_load_tile_model and both attach points (placeholder
path and 3D-model-loaded path) are skipped when affinity == "PureVoid".
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>
When admin replaces a model/art file via the CDN browser, the S3 ETag is
now captured and stored on CardAsset.ContentETag. The ETag is included in
the content sync DTO (CardAssetDto) so clients receive it on every sync.
Client-side ModelCache now keys its disk cache on sha256(url + "#" + etag)
instead of sha256(url), so updating a file at the same CDN path busts the
disk cache automatically. A _CACHE_VER="v2" sentinel purges old-scheme
.bin files on first launch after the client update.
Changes:
- CdnUploadResult: add string? ETag field
- S3CdnClient: capture ETag from PutObjectAsync response
- CardAsset: add string? ContentETag property
- Migration 20260318000001_AddAssetContentETag: add content_etag text column
- ContentMessages: add string? ContentETag to CardAssetDto
- ContentDtoMapper: map ContentETag in CardAsset → CardAssetDto
- CdnBrowser.razor: UploadFileToKeyAsync returns Task<string?> (ETag);
ReplaceAsync calls PropagateAssetETagAsync which updates CardAsset rows
and touches CardDefinition.UpdatedAt to trigger a version bump
- ModelCache.gd: versioned disk key + cache migration + etag parameter on
load_model() and evict()
- game_screen.gd: pass model_asset.contentETag to load_model / retry chain
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>
Move tracked_target consume before the early-return path so fully-blocked
hits (zero HP change on all units) still trigger the defender's blockedSoundUrl
after attack_remaining seconds, matching the timing of a landed hit.
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>
- SFX.gd autoload: fire-and-forget CDN audio player with 8-slot pool,
session-level stream cache, OGG/MP3 support via HTTPRequest download,
uses Settings BUS_SFX so volume/mute work automatically
- Register SFX in project.godot autoloads
- game_screen.gd:
- _sfx_for_unit(iid, key) helper — looks up CardDefinition SFX URL
from ContentCache using the unit's def ID
- Attack sound: played when player initiates attack + counter-attack
- Damaged sound: played at all damage animation sites (immediate,
delayed bystander, post-attack callback, counter-chain)
- Death sound: played when dying animation fires
- Move sound: played when movement animation starts
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>
**Feature 1 — Model retry (client)**
- `ModelCache.gd`: add `evict(url)` to remove failed entries so re-download is possible
- `game_screen.gd`: when GLB load fails, `_schedule_model_retry` queues a 60-second
retry (up to 10 attempts); `_do_model_retry` evicts + re-downloads and swaps the
placeholder mesh for the real model if/when it succeeds
**Feature 2 — Rejoin on login (server + client)**
- Server: `GameGetActiveSessionHandler` (`game.get_active_session`) — returns the
caller's active session ID + phase, or null when no session exists
- Client: `init_screen.gd` checks for an active session after content sync; shows
a "Rejoin / Concede" dialog when one is found; rejoin navigates to GameScreen with
the session ID already set so `send_ready` → `AlreadyStarted` → `_fetch_state`
**Feature 3 — 5-minute inactivity detection (server + client)**
- `GameSession`: add `LastActionAt` column + EF migration
(`20260317000001_AddLastActionAt`)
- `GameHandlerBase.SaveStateAsync`: sets `session.LastActionAt` on every action
- `GameInactivityMonitorService`: background poll every 60 s; when a session hasn't
had an action in ≥ 5 min, pushes `game.inactive_warning` to the stalled player and
`game.opponent_inactive` to their opponent (once per session per server lifetime)
- `GameForceConcedeHandler` (`game.force_concede`): lets the waiting player claim
the win; validates caller is not the active player and `LastActionAt` is stale
- `Game.gd`: new `opponent_inactive` / `inactive_warning` signals + push handlers +
`send_force_concede()` helper
- `game_screen.gd`: handles `opponent_inactive` with Accept/Wait dialog;
handles `inactive_warning` with informational popup
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>
Root cause: _animate_unit_move computed unit_above by subtracting
from_tile_top from body.position.y. If a state update arrived before
the board rebuilt (body still mid-tween), that subtraction produced a
value > 0.28 which then compounded each successive move.
Secondary: from_tile_top was typed :int, silently truncating the float
sum of tile_base + tile_h.
Fix: store above_tile as body metadata in _add_unit_mesh (0.28/0.4/0.5
per card type). _animate_unit_move reads the stored constant directly —
it is immune to board rebuild timing.
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>
Every tile now has a deterministic vertical offset (±0.15 units) in
addition to its existing height variety, giving the board a natural
uneven terrain look. Units placed on tiles and highlight rings account
for the stagger offset. Move animations step through correct per-tile
Y heights so units don't float or sink as they walk across the board.
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>
Visual changes (client):
- 0.1 gap between all tiles (TILE_SPACING = 1.1)
- Placeholder tiles (no 3D model) are now 0.5 height instead of random
0.8-1.0, making undecorated tiles visually distinct
- Placeholder tiles load a 2D CDN texture via HTTP and apply it as the
albedo on the BoxMesh (same affinity-per-shape lookup as 3D models)
- Placeholder tiles also attach a stalagmite bottom model, matching the
look of fully-decorated tiles
Server:
- TileModelBinding.TexturePublicUrl (nullable text) added to entity,
migration 20260317000001_AddTileTexture applied to DB
- TileModelDto extended with TexturePublicUrl
- ContentGetTileModelsHandler includes TexturePublicUrl in response
Admin (/content/tile-models):
- New "Square Texture" and "Hex Texture" columns in the bindings table
- Texture picker modal browses the CDN textures/ prefix and shows image
thumbnails; select + assign writes TexturePublicUrl to the binding
- Texture can be assigned without a 3D model (creates a binding row
with empty model fields)
ContentCache:
- Caches texturePublicUrl alongside modelPublicUrl from tile_models response
- New get_tile_texture_url(affinity, shape) → String accessor
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>
CardInstanceDto lacks the `assets` array, so card art never loaded.
Look up the full CardDefinitionDto from ContentCache (which has assets,
genus, abilitiesJson, and all base stats) and pass it as the `def`
argument to widget.setup().
Also remove the old "compact" code that was hiding the stats grid and
shrinking the art area — the full CardWidget now shows as intended.
Field alias retained: maxMp → movementPoints for CardWidget._load_stats.
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>
The affinity model's visual base is at body-local Y=0 (= world Y=tile_h/2,
the tile centre), because _fit_model_to_tile seats AABB bottom there.
The stalagmite base (AABB top) must sit at the same height so it connects
seamlessly.
Previous shift -(tile_h/2 + scaled_h) placed the base at body-local
Y=-tile_h/2 (world Y=0 = tile physical bottom), creating a gap of tile_h/2
between the affinity model and the stalagmite.
Fix: shift by -scaled_h only, bringing AABB top to body-local Y=0.
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>
MeshInstance3D.get_aabb() returns a zero AABB when the node is not yet
in the scene tree, so the previous code's _fit_model_to_tile call was
a no-op (early return on zero footprint) and scaled_h was always 0.
Fix: add_child the stalagmite to the tile body FIRST (matching the same
order used by _try_load_tile_model for tile top models), then call
_fit_model_to_tile, then read the now-valid AABB to compute scaled_h
and apply the correct downward shift so the wide base lands flush with
the tile underside.
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>
- Stalagmite: remove erroneous flip; models are spike-at-AABB-bottom so
no rotation needed — shift down by (tile_h/2 + scaled_h) so the wide
base lands flush with the tile underside and spike hangs below
- Tile affinity models: revert accidental +tile_h*0.5 lift (those models
were not the subject of the grounding complaint)
- Unit/card models: replace naive (tile_h - y_offset) offset with
AABB-based formula that works regardless of model origin placement
(feet, geometric centre, etc.):
model.position.y = (tile_h - y_offset) - scale.y * aabb.position.y
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>
## Tile height variation (fix)
Tile tops now visibly vary (0.8–1.0) from a fixed bottom at world Y=0.
Previously the top was fixed and the variation was only visible underneath.
Heights are seeded by tile coordinate so they're deterministic per board.
Unit y_offsets and highlight positions update to match per-tile height.
## Stalagmite tile bottoms
Server: new TileBottomModel entity + migration (catalog.tile_bottom_models),
content.tile_bottoms handler returns all active CDN URLs.
Admin: "Tile Bottom Models" section in the Tile Model Manager page —
add/toggle active/delete entries with CDN picker.
Client: ContentCache fetches + disk-caches the URL pool; _try_load_tile_model
picks a random URL and attaches it flipped below the tile model as a
stalagmite using the existing _fit_model_to_tile scale logic.
## Live content refresh
ContentCache schedules start_sync() every 5 minutes after sync_complete so
card definitions, tile models, and bottom models are refreshed in the
background without restarting the client.
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>
Each placeholder tile box is assigned a random visual height between 0.8 and
1.0. The mesh is shifted downward so the TOP surface stays fixed at world
Y=0.5 — collision shapes, unit y_offsets, and highlight positions are all
unchanged. The variation shows as more or less tile-side visible from the
camera angle, giving the grid an uneven, terrain-like appearance.
3D tile models (when loaded) replace the placeholder mesh and are unaffected.
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>
Previously the counterattack chain was only triggered when both units appeared
in damaged_iids (HP decreased). If the defender's defense stat absorbs the
attacker's hit entirely, their HP doesn't change, so they were never in
damaged_iids — the counterattack animation was silently skipped.
Fix: record _last_attack_target_iid in send_attack() and use it in
_play_damage_animations as the primary defender source. The tracked target is
consumed (cleared) on first use so it never bleeds into later state updates.
The old fallback (any other damaged unit) is kept for cases where no tracked
target is available.
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>
Previously both units played "damaged" simultaneously after the attacker's
attack animation. Now when both units take damage in the same state update
(= counterattack), the full chain fires:
1. Mob 1 finishes Attack animation
2. Mob 2 plays Damaged (hit by Mob 1)
3. Mob 2 plays Attack (counterattack)
4. Mob 1 plays Damaged (hit by Mob 2) + Mob 2 returns to Idle
Implementation:
- _override_oneshot(iid, cb): replaces a pending animation_finished ONE_SHOT
callback without leaving stale signal connections
- _play_counter_attack(defender, attacker): plays defender "attack", then
triggers attacker "damaged" + defender "idle" via _override_oneshot
- _play_counter_chain(defender, attacker, delay): tween-delayed entry into the
chain; starts with defender "damaged" then hands off to _play_counter_attack
- _play_damage_animations: detects counterattack (attacker_iid AND another unit
both in damaged_iids), routes to _play_counter_chain; falls through to the
existing simple-damage path otherwise
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>
Attack animations were being interrupted halfway through by "damaged"
because _play_damage_animations fired immediately on state arrival —
even for the attacker who also took counter-damage.
Fix:
- Track each unit's oneshot animation_finished callback in _oneshot_callbacks
so it can be replaced later without a stale lambda leak.
- _is_attack_track() helper matches current animation against ANIM_ALIASES.
- _play_damage_animations now sequences:
Attacker mid-attack → override idle-return callback with "damaged",
so attack plays fully, then damaged plays, then idle.
Defender → delay "damaged" tween by the attack's remaining duration
so the hit lands at the moment the swing connects.
No attack in progress → play "damaged" immediately (existing behaviour).
Result: Attack → (attack lands) defender damaged + attacker damaged → idle.
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>
_valid_move_tiles was gating on isExhausted, but the server tracks
movement and attacks independently. isExhausted=true only means the
unit has attacked this turn; movement is governed solely by currentMp.
Removing the exhaustion check restores move highlights after an attack.
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>
Model facing: GLB models exported from Blender arrive in Godot facing +Z,
not -Z. Changed _facing_to_base_angle default case from 0 (north/-Z) to
PI (south/+Z). Explicit "north" case added. Updated admin dropdown label
from "Default (north)" to "Default (south / Blender GLB)" to match.
Stale game state: when matchmaking.match_found is received, clear Game.state
so the new GameScreen always calls send_ready() rather than rendering the
previous (ended) game's state. Fixes same-players-re-match ending up in
the already-completed 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>
SERVER
- CardAsset gains ModelFacingDirection (string?), ModelScale (float?),
ModelTintColor (string?), ModelTintMaskUrl (string?) columns.
- CardAssetDto and ContentDtoMapper updated to expose them.
- EF migration AddModelConfig applied to pg-forge-01 / SOR DB.
CLIENT (game_screen.gd)
Animation loop:
- GLB standard: first 5 frames (ANIM_TRANSITION_SECS = 5/30s) are
entry frames that blend from idle into the action. Looping
animations now skip those frames on every iteration after the
first, eliminating the bind-pose flash at the loop seam.
- Manual loop management via animation_finished + CONNECT_ONE_SHOT
replaces LOOP_LINEAR so the seek-past-transition trick works.
- _idle_callbacks tracks active loop callables so they can be
disconnected when a one-shot animation interrupts idle.
- _idle_entry_done reset when a one-shot starts so the transition
frames play correctly when returning to idle after the action.
Model config:
- _find_model3d_asset() replaces _find_model3d_url() — returns the
full asset dict including the new fields.
- ModelFacingDirection → _facing_to_base_angle() → rotation.y applied
at load; stored in _model_base_angles for movement / idle reset.
- ModelScale applied uniformly to model_node.scale on load.
- ModelTintColor applied as multiplicative albedo_color tint to all
StandardMaterial3D surfaces (materials duplicated per-instance).
- ModelTintMaskUrl stored in DB/DTO; per-texel shader not yet wired.
Movement facing:
- _animate_unit_move pre-computes a facing angle per BFS step and
snaps model_node.rotation.y at the start of each step so units
face the direction they walk.
- On movement end, rotation resets to the idle/team direction.
Cleanup:
- _rebuild_units removal loop erases _idle_entry_done, _idle_callbacks,
_model_base_angles, _needs_face_rot for freed units.
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>
_rebuild_units was destroying and recreating ALL unit bodies on every
state update, including echo broadcasts (delay=0, no animation needed).
Each recreation restarted idle from frame 0 — causing the bind-pose
flash the user sees as "T-pose then playing idle again."
Now _rebuild_units is incremental:
- Remove only units that left the board (died / discarded).
- Add only units newly present (just played / first connect).
- Leave existing unit bodies untouched so their animations continue
without interruption.
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>
Three bugs fixed in _play_unit_anim:
1. Idle restarts mid-loop: the "don't restart" guard was `if not loop`,
so calling _play_unit_anim(iid,"idle",true) while idle was already
playing called ap.play() again, resetting to frame 0 (bind-pose flash).
Fixed: guard now applies to both loop and one-shot animations.
2. Bind-pose gap between one-shot end and idle: animation_finished
signal fires one process frame after the animation ends, leaving the
AnimationPlayer in a stopped state for that frame → T-pose flash.
Fixed: use ap.queue(idle_track) immediately after ap.play(one_shot),
so Godot transitions without any gap.
3. Dying animation transitions to idle: the one-shot path queued idle
after every non-loop animation including dying/death, overriding the
death-hold frame. Fixed: skip idle queue for dying/death/die.
Also remove [Anim]/[Move]/[Rebuild] debug prints now that animations
are confirmed working.
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>
Rapid echo state-updates (phase-change, turn-tick) arriving with
delay=0 used to cancel the pending movement tween, making unit travel
instant. Now a delay=0 call only updates _pending_rebuild so the
latest state is applied when the existing tween fires; the tween is
only cancelled when a new positive delay arrives.
Also: password min-length 12→8 (auth), anchor preset cleanup (tscn).
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>
CORS: Access-Control-Allow-Origin must be set before the CDN GetAsync
call so it is present even if the upstream throws (ASP.NET Core exception
handling resets responses, dropping headers set after an exception).
Added try/catch to return 502 cleanly on upstream failures.
Debug: [Move] prints in _play_move_animations and _schedule_rebuild to
diagnose why movement animation appears instant.
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>
Queue entries store paths as plain Array (nested in an untyped Array).
GDScript cannot implicitly upcast Array → Array[Vector2i] on pop_front.
Keep path variables untyped while building; use Array.assign() to
produce a typed Array[Vector2i] only at the final return point.
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>
Units now animate before their nodes are rebuilt:
Deferred rebuild
- _schedule_rebuild(state, delay) uses a Tween to hold off _rebuild_units
until animations finish; a new state cancels and replaces the pending rebuild
- POST_ANIM_SECS (1.2s) delay for attack / damaged / dying one-shots
- Hand and HUD update immediately; only the board is delayed
BFS movement animation
- _bfs_path() does 4-directional BFS avoiding other units' old positions
- _animate_unit_move() tweens the StaticBody3D through each grid step
(EASE_IN_OUT / TRANS_SINE, 0.28s per cell) while playing the Moving loop
- Returns to Idle automatically when the tween finishes
- rebuild delay = max(move duration, POST_ANIM_SECS if damage played)
- Model load callback skips position reset if a move tween owns the body
Housekeeping
- _play_damage_animations now returns bool (triggered any anim?)
- _update_prev_state() replaces HP/pos tracking that was in _rebuild_units
- _rebuild_units kills all in-flight move tweens before destroying nodes
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>
GLB animations exported from DCC tools often prefix track names with
the model name using a dot (Merlock.Attack) or underscore (Merlock_IDLE).
The previous resolver only stripped the GLTF library prefix (before '/').
Now tries three forms after stripping the library prefix:
1. Direct match ("Idle" → "idle")
2. After last dot ("Merlock.Attack" → "attack")
3. After first underscore ("Merlock_IDLE" → "idle")
Each form is tried for the canonical action name and all its aliases,
so "Merlock.Attacked" maps to "damaged" via the "attacked" alias, and
"Merlock.Move" maps to "moving" via the "move" alias.
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>
Adds targeted print statements at 3 key checkpoints in the GLB
animation system to identify why animations don't play:
1. model_url presence (per unit, on every state rebuild)
2. AnimationPlayer presence + full track list (after model load)
3. Track resolution result in _play_unit_anim
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>
Server:
- CardAnimationBinding.AnimationTrackName: nullable override for GLB track name
(blank = case-insensitive convention match; Idle/Attack/Damaged/Moving/Dying)
- CardAnimationBindingDto: includes AnimationTrackName in content sync
- CardEditor: GLB Track Name column in animation bindings table
- CdnBrowser: model-viewer animation list + playback (JS interop on load event)
- Migration: AddAnimationTrackName applied to production
Client:
- ContentCache.get_anim_track(): resolves GLB track name from binding override
or falls back to convention with case-insensitive aliases
- game_screen.gd:
- _find_animation_player(): recursive search in loaded GLB scene tree
- _resolve_anim_track(): case-insensitive + alias resolution
- _play_unit_anim(): plays track, returns to Idle when one-shot finishes
- _play_damage_animations(): detects HP drops and unit deaths before rebuild
- Model facing: P1 units rotated 180deg Y to face opponent across board
- Idle loop starts automatically after real model loads
- Attack animation fires immediately on attack input (before ACK)
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>
When game.over was received, Game.state was not cleared. If both players
re-queued and matched again, the new GameScreen saw non-empty state and
called _on_state_updated instead of send_ready(), leaving the new session
stuck in Initializing. Clearing state = {} before emitting game_over fixes this.
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>
- Status label: connect Network.connected so "Connecting…" clears once the
WebSocket opens (previously the label stuck forever with no session)
- Remember Me: apply font_color override so the checkbox text is visible
- Register errors: map ASP.NET Identity password-policy error codes
(PasswordTooShort, PasswordRequiresUpper/Lower/NonAlphanumeric/Digit) to
user-friendly strings; old WEAK_PASSWORD kept as alias
- Chat poll: guard _on_message_poll_tick with Auth.user_id check so the timer
cannot send chat.get_messages as the first message on a fresh connection
when the user is not yet authenticated (caused by logout not stopping the
timer, leaving it running into the next reconnect cycle)
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>
_highlight_ability_targets was ignoring the target selector's filters array
entirely — it showed all ownership-matched units as clickable regardless of
spatial constraints. The server correctly rejected out-of-range selections
(after the previous fix) but the UI still offered them.
Added _unit_passes_filters() and _tile_passes_filters() which evaluate the
withinrange and isadjacenttosource filters using Manhattan distance from the
ability source unit before adding a tile highlight. Other filters (HasFlag,
AffinityMatches, etc.) are left as pass-through for now since they didn't
affect visibility in any reported case.
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>
- AbilitySystem: implement WithinRangeFilter (Manhattan distance min/max) and
IsAdjacentToSourceFilter in FilterMatches — both were falling through to
_ => true, so range constraints on targeting were silently ignored
- Program.cs: add GET /cdn/{**path} proxy endpoint with
Access-Control-Allow-Origin: * so browser web clients can fetch GLB models
(Ceph RadosGW / cdn.aeternalisgames.com has no CORS headers)
- ModelCache.gd: on web export, rewrite cdn.aeternalisgames.com URLs to go
through hub.aeternalisgames.com/cdn proxy; disk/memory cache still keyed
on the original CDN URL for consistency across platforms
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>