From b1ca87bc29174d0ed20aff759d8494962e20e3ac Mon Sep 17 00:00:00 2001 From: SMUnlimited Date: Thu, 21 Nov 2024 16:42:05 +0000 Subject: [PATCH] Improve windwalk usage so it can come out when only buildings left --- CHANGELOG.md | 1 + Jobs/FOCUSFIRE_CONTROL.eai | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d3e4cedf6..267c79896 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fix to avoid rare crashes in job thread. - Fix to avoid a case where AMAI tries to buy more than one hero in tier 1 and when using the recalculate heros ai command. - Fix Panda clones to not be canceled early when hero is going home or buying items. +- If no units to attack with windwalk, then will exit windwalk and just attack a building rather than just stand around doing nothing. ## [3.4.0] - 2024-11-19 diff --git a/Jobs/FOCUSFIRE_CONTROL.eai b/Jobs/FOCUSFIRE_CONTROL.eai index 00d9afcb9..1ec18b2d4 100644 --- a/Jobs/FOCUSFIRE_CONTROL.eai +++ b/Jobs/FOCUSFIRE_CONTROL.eai @@ -82,7 +82,7 @@ function GroupOrderFocusWindInstant_d takes group g, unit target returns nothing call RemoveGuardPosition(u) call IssueTargetOrder(u, "attack", target) call TQAddUnitJob(1.8, RESET_WINDWALKER, 0, u) // Needs to happen before the next focus fire iteration - else + elseif not IsUnitType(target,UNIT_TYPE_STRUCTURE) then call CreateDebugTag("FF: windwalk", 10, u, 1.00, 0.80) call IssueImmediateOrder(u, "windwalk") endif @@ -193,7 +193,7 @@ function FocusFire takes unit u returns nothing call DestroyGroup(t) if BlzGroupGetSize(temp_focus) > 0 then if focus_fire_unit == null or focus_fire_unit != u then - if IsUnitType(u,UNIT_TYPE_STRUCTURE) == false and not IsUnitOwnedByPlayer(u, Player(PLAYER_NEUTRAL_AGGRESSIVE)) then // Dont windwalk for non-critical enemies + if not IsUnitOwnedByPlayer(u, Player(PLAYER_NEUTRAL_AGGRESSIVE)) then // Dont windwalk for non-critical enemies call GroupOrderFocusWindInstant_d(temp_focus, u) endif set focus_fire_unit = u