Skip to content

Commit

Permalink
#186 Fix to ensure shredder is not highest priorty over normal peons …
Browse files Browse the repository at this point in the history
…or ghouls
  • Loading branch information
SMUnlimited committed Nov 13, 2023
1 parent 81845be commit 9b656a3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions common.eai
Original file line number Diff line number Diff line change
Expand Up @@ -10419,8 +10419,12 @@ function ShredderBuilder takes nothing returns nothing
local real g = GetGold()
local real w = Max(GetWood(),1)
local real gdivw = g / w
if neutral_available[NEUTRAL_OBSERVATORY] and gdivw > 4 and g - w > 500 and w < 550 and ai_time - available_time[neutral_shredder] >= -1 then
call BuildUnit(1, neutral_shredder, peon_prio)
if neutral_available[NEUTRAL_OBSERVATORY] and gdivw > 4 and g - w > 500 and w < 550 and g > GetUnitGoldCost2(neutral_shredder) and w > GetUnitWoodCost2(neutral_shredder) and ai_time - available_time[neutral_shredder] >= -1 then
if (race_has_ghouls) then
call BuildUnit(1, neutral_shredder, ghoul_prio - 4)
else
call BuildUnit(1, neutral_shredder, peon_prio - 10)
endif
endif
endfunction

Expand Down

0 comments on commit 9b656a3

Please sign in to comment.