diff --git a/CHANGELOG.md b/CHANGELOG.md index 28b3cc6f0..1e9c8cde5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Slight tweak to strength calculation to prevent creep levels being calculated incorrectly in some cases and don't average hero levels as unessecary. - Harass attacks were occuring often for all AI's regardless of aggression level so they now occur less often for less aggressive profiles. - AI with high food use will now reform less often during travel to make faster progress to their desired targets. +- Future army locations are now always calculated a fixed distance from the current location to avoid a town thinking its under threat but is no where near, the army just moved fast. ### Deprecated - (DevTools) 'race_ancient_expansion_strength' setting does not do anything anymore as it uses actual strength to determine feasability of attack. @@ -21,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fixed bug where ancient attacks didn't take account of ancient strength in retreat calculations. - Item expansion now only occurs when the AI naturally wants to expand instead of making the AI expand earlier. - Fixed an issue where as ghouls die in an attack, harvesting ghouls are being pulled off to fill dead/fleeing units. +- Fixed an issue where harvesting ghouls were detected as the main army in some cases. - (DevTools) Removed use of hardcoded ids in expansion tracking for custom mod support. ## [3.4.1] - 2024-12-07 diff --git a/Jobs/ARMY_TRACK.eai b/Jobs/ARMY_TRACK.eai index 33460f5a0..2c2ff6746 100644 --- a/Jobs/ARMY_TRACK.eai +++ b/Jobs/ARMY_TRACK.eai @@ -53,7 +53,7 @@ function TrackArmy takes integer num returns boolean loop set u = FirstOfGroup(g) exitwhen u == null - if UnitAlive(u) and GetOwningPlayer(u) == Player(army_owner[num]) and not IsUnitType(u, UNIT_TYPE_STRUCTURE) and not IsUnitType(u, UNIT_TYPE_PEON) and not IsUnitInGroup(u, in_army_group) and IsStandardUnit(u) and not IsUnitBuying(u) then + if UnitAlive(u) and GetOwningPlayer(u) == Player(army_owner[num]) and not IsUnitType(u, UNIT_TYPE_STRUCTURE) and not IsUnitType(u, UNIT_TYPE_PEON) and not IsUnitInGroup(u, in_army_group) and IsStandardUnit(u) and not IsUnitBuying(u) and GetUnitCurrentOrder(u) != OrderId("harvest") and GetUnitCurrentOrder(u) != OrderId("resumeharvesting") then // harvest check to ignore harvesting ghouls as they not an army if tmpmainarmy < 0 and u == major_hero then set tmpmainarmy = num // fallback main army set main_army = num @@ -96,7 +96,9 @@ function TrackArmy takes integer num returns boolean endif set army_loc[num] = Location(GetLocationX(l), GetLocationY(l)) call RemoveLocation(army_future[num]) - set army_future[num] = GetSumLoc_kd(army_loc[num], GetMultipleLoc(army_dir[num], army_future_mult)) + call RemoveLocation(l) + set l = GetSumLoc_kd(army_loc[num], GetMultipleLoc(army_dir[num], army_future_mult)) // This just sets a point in direction we want + set army_future[num] = GetProjectedLoc(army_loc[num], l, no_threat_distance) // Fixed location in direction army is going // if army_strength[num] != 0 then // call PingMinimap(GetLocationX(l), GetLocationY(l), 4)