Game screen: CardWidget hand, Dimorpha/Trimorpha tile hints, attack range, camera
Hand display: - Replace bespoke _make_hand_card() with CardWidget.tscn (the shared collection card widget) — shows art, stats, affinity border, SP/ST costs - Pass live game card dict as both dto and def; all camelCase fields match - _refresh_hand_selection() now calls widget.set_selected() instead of manipulating StyleBoxFlat directly - HandArea/RightPanel height 180 → 260px to fit CardWidget (238px natural height) - HBoxContainer separation -12 (overlap) → 6px (proper spacing) Terramorpha tile selection (Dimorpha / Trimorpha): - After each tile pick, re-highlight: orange for already-selected tiles, green for valid adjacent tiles for the next pick — no more silent rejection of non-adjacent clicks Attack range visualization: - _attack_range_tiles(): returns all tiles within minAttackRange–maxAttackRange for units with maxRange > 1 (ranged spirits) - _select_unit() shows orange range area first, then red on top for actual attackable enemies — players can now see a ranged unit's full reach Camera orientation: - On first state that includes playerOneAccountId, orient camera behind the local player's row: P1 (row 0, world -Z) gets yaw=180°, P2 keeps yaw=0° - _camera_oriented flag ensures this only runs once per scene entry 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>
This commit is contained in:
@@ -96,7 +96,7 @@ anchor_left = 0.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.75
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -180.0
|
||||
offset_top = -260.0
|
||||
offset_right = 0.0
|
||||
|
||||
[node name="HandScroll" type="ScrollContainer" parent="HUD/HandArea"]
|
||||
@@ -110,7 +110,7 @@ vertical_scroll_mode = 0
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 4
|
||||
theme_override_constants/separation = -12
|
||||
theme_override_constants/separation = 6
|
||||
|
||||
[node name="RightPanel" type="PanelContainer" parent="HUD"]
|
||||
layout_mode = 1
|
||||
@@ -119,7 +119,7 @@ anchor_left = 0.75
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_top = -180.0
|
||||
offset_top = -260.0
|
||||
|
||||
[node name="RightMargin" type="MarginContainer" parent="HUD/RightPanel"]
|
||||
layout_mode = 2
|
||||
|
||||
Reference in New Issue
Block a user