Game screen: ownership fix, hand hover, terramorpha, sacrifice, ascend/transition, ability UI
- Game.gd: fix push type "game.over" (not "game.over.push"), store opponent_name
- game_screen.gd full rewrite:
- Unit ownership via _rebuild_ownership() + _is_enemy_unit()/_is_friendly_unit()
(CardInstanceDto has no ownerAccountId; build sets from PlayerStateDto instead)
- Hand card hover y-reset fixed to 0.0 (was incorrectly using container position)
- Opponent name from Game.opponent_name
- Terramorpha multi-tile sequential selection with adjacency validation
- Sacrifice: click ArchSpirit → PopupMenu → select spirit → ConfirmationDialog
- Ascend/Transition: detected by card tier vs current arch tier, confirmation dialogs
- Ability panel: parses abilitiesJson, filters Active abilities, floating HUD buttons
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:
@@ -24,8 +24,9 @@ signal game_over(winner_account_id: String, win_condition: String,
|
||||
|
||||
# ── State ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
var session_id : String = ""
|
||||
var state : Dictionary = {}
|
||||
var session_id : String = ""
|
||||
var state : Dictionary = {}
|
||||
var opponent_name : String = ""
|
||||
|
||||
# ── Lifecycle ─────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -35,8 +36,9 @@ func _ready() -> void:
|
||||
|
||||
|
||||
func _clear_state() -> void:
|
||||
session_id = ""
|
||||
state = {}
|
||||
session_id = ""
|
||||
state = {}
|
||||
opponent_name = ""
|
||||
|
||||
# ── Public helpers ────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -225,7 +227,8 @@ func _on_server_push(type: String, payload: Variant) -> void:
|
||||
var sid : String = str(d.get("gameSessionId", ""))
|
||||
var oname : String = str(d.get("opponentDisplayName", "Opponent"))
|
||||
var orank : int = int(d.get("opponentRankScore", 0))
|
||||
session_id = sid
|
||||
session_id = sid
|
||||
opponent_name = oname
|
||||
match_found.emit(sid, oname, orank)
|
||||
|
||||
"game.state_update.push":
|
||||
@@ -235,7 +238,7 @@ func _on_server_push(type: String, payload: Variant) -> void:
|
||||
state = s
|
||||
state_updated.emit(state)
|
||||
|
||||
"game.over.push":
|
||||
"game.over":
|
||||
var d := payload as Dictionary
|
||||
var winner : String = str(d.get("winnerAccountId", ""))
|
||||
var wc : String = str(d.get("winCondition", ""))
|
||||
|
||||
@@ -37,7 +37,7 @@ func _on_submit() -> void:
|
||||
_set_status("Submitting…", false)
|
||||
|
||||
var cat_idx := category_option.selected
|
||||
var cat := CATEGORIES[cat_idx] if cat_idx >= 0 else "other"
|
||||
var cat : Variant = CATEGORIES[cat_idx] if cat_idx >= 0 else "other"
|
||||
|
||||
Network.request(
|
||||
"support.submit_bug_report",
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
[gd_scene load_steps=2 format=3]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dinmbgl2jwppv"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/collection/components/card_detail_popup.gd" id="1_cdp"]
|
||||
[ext_resource type="Script" uid="uid://bbs4g6f1ax4er" path="res://scenes/collection/components/card_detail_popup.gd" id="1_cdp"]
|
||||
|
||||
[node name="CardDetailPopup" type="Control"]
|
||||
visible = false
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 0
|
||||
visible = false
|
||||
script = ExtResource("1_cdp")
|
||||
|
||||
[node name="Overlay" type="ColorRect" parent="."]
|
||||
@@ -21,8 +20,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.0, 0.0, 0.0, 0.72)
|
||||
mouse_filter = 0
|
||||
color = Color(0, 0, 0, 0.72)
|
||||
|
||||
[node name="Center" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
@@ -34,12 +32,11 @@ grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Panel" type="PanelContainer" parent="Center"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(310, 0)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Scroll" type="ScrollContainer" parent="Center/Panel"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(0, 0)
|
||||
horizontal_scroll_mode = 0
|
||||
|
||||
[node name="Inner" type="MarginContainer" parent="Center/Panel/Scroll"]
|
||||
@@ -60,8 +57,8 @@ theme_override_constants/separation = 8
|
||||
|
||||
[node name="AffinityIcon" type="TextureRect" parent="Center/Panel/Scroll/Inner/VBox/HeaderRow"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(28, 28)
|
||||
layout_mode = 2
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
@@ -69,25 +66,25 @@ stretch_mode = 5
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_font_sizes/font_size = 18
|
||||
text = "Card Name"
|
||||
vertical_alignment = 1
|
||||
theme_override_font_sizes/font_size = 18
|
||||
|
||||
[node name="FoilBadge" type="Label" parent="Center/Panel/Scroll/Inner/VBox/HeaderRow"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "✦ Foil"
|
||||
visible = false
|
||||
modulate = Color(0.95, 0.85, 0.30, 1.0)
|
||||
vertical_alignment = 1
|
||||
modulate = Color(0.95, 0.85, 0.3, 1)
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 12
|
||||
text = "✦ Foil"
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CloseBtn" type="Button" parent="Center/Panel/Scroll/Inner/VBox/HeaderRow"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(32, 32)
|
||||
text = "✕"
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 16
|
||||
text = "✕"
|
||||
|
||||
[node name="TagRow" type="HBoxContainer" parent="Center/Panel/Scroll/Inner/VBox"]
|
||||
layout_mode = 2
|
||||
@@ -95,9 +92,8 @@ theme_override_constants/separation = 8
|
||||
|
||||
[node name="TypeLabel" type="Label" parent="Center/Panel/Scroll/Inner/VBox/TagRow"]
|
||||
unique_name_in_owner = true
|
||||
modulate = Color(0.7, 0.7, 0.8, 1)
|
||||
layout_mode = 2
|
||||
text = ""
|
||||
modulate = Color(0.70, 0.70, 0.80, 1.0)
|
||||
theme_override_font_sizes/font_size = 13
|
||||
|
||||
[node name="TagFill" type="Control" parent="Center/Panel/Scroll/Inner/VBox/TagRow"]
|
||||
@@ -107,7 +103,6 @@ size_flags_horizontal = 3
|
||||
[node name="AffinityLabel" type="Label" parent="Center/Panel/Scroll/Inner/VBox/TagRow"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = ""
|
||||
theme_override_font_sizes/font_size = 13
|
||||
|
||||
[node name="TagFill2" type="Control" parent="Center/Panel/Scroll/Inner/VBox/TagRow"]
|
||||
@@ -117,7 +112,6 @@ size_flags_horizontal = 3
|
||||
[node name="RarityLabel" type="Label" parent="Center/Panel/Scroll/Inner/VBox/TagRow"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = ""
|
||||
theme_override_font_sizes/font_size = 13
|
||||
|
||||
[node name="StatsSep" type="HSeparator" parent="Center/Panel/Scroll/Inner/VBox"]
|
||||
@@ -126,21 +120,21 @@ layout_mode = 2
|
||||
[node name="StatsGrid" type="GridContainer" parent="Center/Panel/Scroll/Inner/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
columns = 4
|
||||
theme_override_constants/h_separation = 8
|
||||
theme_override_constants/v_separation = 6
|
||||
columns = 4
|
||||
|
||||
[node name="AbilitiesSep" type="HSeparator" parent="Center/Panel/Scroll/Inner/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
||||
[node name="AbilitiesTitle" type="Label" parent="Center/Panel/Scroll/Inner/VBox"]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Abilities"
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 14
|
||||
text = "Abilities"
|
||||
|
||||
[node name="AbilitiesList" type="VBoxContainer" parent="Center/Panel/Scroll/Inner/VBox"]
|
||||
unique_name_in_owner = true
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user