Skip to content

Commit

Permalink
Fix formgroup calculations #240
Browse files Browse the repository at this point in the history
  • Loading branch information
SMUnlimited committed Feb 25, 2024
1 parent 8ff8d8c commit c99cda9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed an issue where only a specific creep needs to be killed for AMAI to think mines and neutral buildings were unguarded going forwards.
- Fixed an issue where town threat was always 0 or negative so AMAI couldn't tell it was in danger correctly.
- Fixed an issue where AMAI would share heroes with each other on defeat which is not intended behaviour and could break score screens.
- Fixed a minor issue related related to forming assault groups.
- (Classic) Fixed game start crash with AMAI vs AI. (jzy-chitong56)
- (Classic) Fixed some TFT settings not in sync with REFORGED.
- (DevTools) Fixed the optimize all script and the makeAll and optimizeAll scripts will pause between versions.
Expand Down
12 changes: 2 additions & 10 deletions common.eai
Original file line number Diff line number Diff line change
Expand Up @@ -11342,7 +11342,7 @@ function FormGroupAM takes integer seconds returns nothing
set desire = attack_max[index]
set count = TownCountDone(unitid)

if unitid == racial_ghoul then
if unitid == racial_ghoul and not take_all_ghouls_along then
set desire = attacking_ghouls
if towerrush then
set desire = Min(Max(count - 2 , 0),desire) // reserve
Expand All @@ -11354,15 +11354,7 @@ function FormGroupAM takes integer seconds returns nothing
if count >= desire then
call AddAssault(desire,old_id[unitid])
else
if unitid != racial_ghoul or take_all_ghouls_along then
set desire = attack_qty[index]
endif

if count < desire then
call AddAssault(desire,old_id[unitid])
else
call AddAssault(count,old_id[unitid])
endif
call AddAssault(count,old_id[unitid])
endif

set index = index + 1
Expand Down

0 comments on commit c99cda9

Please sign in to comment.