local Tinkr, ---@type Bastion Bastion = ... local Player = Bastion.UnitManager:Get('player') ---@alias GetRangedTargetCount fun(range: number): number ---@type GetRangedTargetCount local function GetRangedTargetCount(range) local count = 0 Bastion.UnitManager:EnumEnemies(function(unit) if not unit:IsDead() and unit:IsAffectingCombat() and Player:CanSee(unit) and Player:GetDistance(unit) <= range and Player:IsFacing(unit) then count = count + 1 return false end return false end) return count end return GetRangedTargetCount