diff --git a/Client/origin-client/scenes/game/game_screen.gd b/Client/origin-client/scenes/game/game_screen.gd index b45127f..8add5fe 100644 --- a/Client/origin-client/scenes/game/game_screen.gd +++ b/Client/origin-client/scenes/game/game_screen.gd @@ -1357,12 +1357,12 @@ func _highlight_ability_targets(action: Dictionary) -> void: func _unit_passes_filters(unit: Dictionary, filters: Array) -> bool: if filters.is_empty(): return true var src := Game.get_unit_by_id(_ability_unit_id) - var src_pos := src.get("position", {}) + var src_pos : Dictionary = src.get("position", {}) for f: Dictionary in filters: match f.get("$type", ""): "withinrange": if src_pos.is_empty(): return false - var tgt_pos := unit.get("position", {}) + var tgt_pos : Dictionary = unit.get("position", {}) if tgt_pos.is_empty(): return false var dist := (absi(int(tgt_pos.get("x", 0)) - int(src_pos.get("x", 0))) + absi(int(tgt_pos.get("y", 0)) - int(src_pos.get("y", 0)))) @@ -1370,7 +1370,7 @@ func _unit_passes_filters(unit: Dictionary, filters: Array) -> bool: return false "isadjacenttosource": if src_pos.is_empty(): return false - var tgt_pos := unit.get("position", {}) + var tgt_pos : Dictionary = unit.get("position", {}) if tgt_pos.is_empty(): return false var dist := (absi(int(tgt_pos.get("x", 0)) - int(src_pos.get("x", 0))) + absi(int(tgt_pos.get("y", 0)) - int(src_pos.get("y", 0)))) @@ -1382,7 +1382,7 @@ func _unit_passes_filters(unit: Dictionary, filters: Array) -> bool: func _tile_passes_filters(tx: int, ty: int, filters: Array) -> bool: if filters.is_empty(): return true var src := Game.get_unit_by_id(_ability_unit_id) - var src_pos := src.get("position", {}) + var src_pos : Dictionary = src.get("position", {}) for f: Dictionary in filters: match f.get("$type", ""): "tilewithinrange":