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", ""))
|
||||
|
||||
Reference in New Issue
Block a user