From 66b116b5e0b12abae7916eae588b0b0d11eac60d Mon Sep 17 00:00:00 2001 From: dingo Date: Sat, 28 Mar 2026 11:30:09 -0400 Subject: [PATCH] Fix bool crash in _play_damage_animations (GDScript or operator) GDScript 4's `or` is a logical operator that returns bool, not the left/right value like Python. `player.get("archSpirit") or {}` was putting true/false into the iteration array instead of the dict, causing `is_empty` to fail with 'base bool'. Replace with an explicit null check: var _arch_list = [] if arch_raw == null else [arch_raw] Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- Client/origin-client/scenes/game/game_screen.gd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index c95b501..96c6a6b 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -1704,7 +1704,9 @@ func _play_damage_animations(state: Dictionary) -> bool: var damaged_iids : Dictionary = {} var seen_iids : Dictionary = {} for player: Dictionary in state.get("players", []): - for unit: Dictionary in ([player.get("archSpirit") or {}] + player.get("field", [])): + var _arch_raw = player.get("archSpirit") + var _arch_list : Array = [] if _arch_raw == null else [_arch_raw] + for unit: Dictionary in (_arch_list + player.get("field", [])): if unit.is_empty(): continue var iid := str(unit.get("instanceId", "")) var new_hp := int(unit.get("currentHealth", 0))