From 77dbc7fce34b434798049b911aa36bc7b9e01aa8 Mon Sep 17 00:00:00 2001 From: dingo Date: Mon, 9 Mar 2026 08:44:36 -0400 Subject: [PATCH] Fixed Terramorpha, was order of operations, terra count being wiped right after being set --- .claude/settings.local.json | 7 +++++++ Client/origin-client/scenes/game/game_screen.gd | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 0000000..136586c --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "Bash(find:*)" + ] + } +} diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index 3075e6a..88a2d37 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -737,6 +737,7 @@ func _handle_board_click(mouse_pos: Vector2) -> void: _set_mode(Mode.NONE); return # Validate adjacency to previous target for Di/Tri. if _terra_targets.size() > 0: + print("_terra_targets: ", _terra_targets.size()) var last : Vector2i = _terra_targets.back() if abs(coord.x - last.x) + abs(coord.y - last.y) != 1: return # must be adjacent @@ -746,6 +747,8 @@ func _handle_board_click(mouse_pos: Vector2) -> void: _terra_targets.append(coord) print("Added Target") if _terra_targets.size() >= _terra_count: + print("Entering here") + print("_terra_count: ", _terra_count) # All tiles selected — send play. var targets := _terra_targets.map(func(v: Vector2i) -> Dictionary: return { "x": v.x, "y": v.y }) @@ -1110,8 +1113,9 @@ func _on_hand_card_clicked(iid: String, _panel: PanelContainer) -> void: return _sel_card_id = iid _terra_targets = [] - _terra_count = _terra_count_for_card(card) + print("_terra Array clean. _terra_count: ", _terra_count) _set_mode(Mode.TERRAMORPHA_SELECT) + _terra_count = _terra_count_for_card(card) _clear_highlights() _highlight_tiles(_valid_play_tiles(card), HI_GREEN) return