diff --git a/lua/AI/aiattackutilities.lua b/lua/AI/aiattackutilities.lua index c1340b9628..2aad747cbc 100644 --- a/lua/AI/aiattackutilities.lua +++ b/lua/AI/aiattackutilities.lua @@ -203,9 +203,7 @@ function GetBestThreatTarget(aiBrain, platoon, bSkipPathability) -- is less than this level, then just outright ignore it as a threat local IgnoreThreatLessThan = 15 -- if the platoon is stronger than this threat level, then ignore weaker targets if the platoon is stronger - -- by the given ratio local IgnoreWeakerTargetsIfStrongerThan = 20 - local IgnoreWeakerTargetsRatio = 5 -- When evaluating threat, how many rings in the threat grid do we look at local EnemyThreatRings = 1 @@ -237,7 +235,6 @@ function GetBestThreatTarget(aiBrain, platoon, bSkipPathability) SecondaryTargetThreatType = SecondaryTargetThreatType or ThreatWeights.SecondaryTargetThreatType IgnoreCommanderStrength = IgnoreCommanderStrength or ThreatWeights.IgnoreCommanderStrength IgnoreWeakerTargetsIfStrongerThan = ThreatWeights.IgnoreWeakerTargetsIfStrongerThan or IgnoreWeakerTargetsIfStrongerThan - IgnoreWeakerTargetsRatio = ThreatWeights.IgnoreWeakerTargetsRatio or IgnoreWeakerTargetsRatio IgnoreThreatLessThan = ThreatWeights.IgnoreThreatLessThan or IgnoreThreatLessThan PrimaryTargetThreatType = ThreatWeights.PrimaryTargetThreatType or PrimaryTargetThreatType SecondaryTargetThreatType = ThreatWeights.SecondaryTargetThreatType or SecondaryTargetThreatType @@ -355,7 +352,6 @@ function GetBestThreatTarget(aiBrain, platoon, bSkipPathability) if myThreat <= IgnoreStrongerTargetsIfWeakerThan and (myThreat == 0 or enemyThreat / (myThreat + friendlyThreat) > IgnoreStrongerTargetsRatio) and unitCapRatio < IgnoreStrongerUnitCap then - --LOG('*AI DEBUG: Skipping threat') continue end @@ -364,7 +360,7 @@ function GetBestThreatTarget(aiBrain, platoon, bSkipPathability) threat[3] = threat[3] + threatDiff * WeakAttackThreatWeight else -- ignore overall threats that are really low, otherwise we want to defeat the enemy wherever they are - if (baseThreat <= IgnoreThreatLessThan) or (myThreat >= IgnoreWeakerTargetsIfStrongerThan and (enemyThreat == 0 or myThreat / enemyThreat > IgnoreWeakerTargetsRatio)) then + if (baseThreat <= IgnoreThreatLessThan) then continue end threat[3] = threat[3] + threatDiff * StrongAttackThreatWeight