Skip to content

Commit

Permalink
Improve windwalk usage so it can come out when only buildings left
Browse files Browse the repository at this point in the history
  • Loading branch information
SMUnlimited committed Nov 21, 2024
1 parent e97ed38 commit b1ca87b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Jobs/FOCUSFIRE_CONTROL.eai
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b1ca87b

Please sign in to comment.