Skip to content

Commit

Permalink
Corrected tierup condition
Browse files Browse the repository at this point in the history
  • Loading branch information
SMUnlimited committed Nov 30, 2024
1 parent 5527096 commit 9f1ec90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common.eai
Original file line number Diff line number Diff line change
Expand Up @@ -11693,7 +11693,8 @@ function OneBuildLoopAM takes nothing returns nothing
call Trace("NO RESOURCES " + logtype + unitNames[id] + " " + Int2Str(id))
set tracednoresources = id
endif
if tp == BUILD_UNIT and (ret == CANNOT_BUILD or ret == BUILT_SOME) and qty < build_qty[index] *0.75 then

if tp == BUILD_UNIT and Max(TownCountTown(id,build_town[index]),mo) < build_qty[index] * 0.75 then
set blocktierup = true // Block tier up if a large proportion of requested units of strategy not built
endif
exitwhen ret == NOT_ENOUGH_RES and tp != BUILD_ITEM and tp != BUILD_UPGRADE // Don't try and build anything else as thing we trying to buy is too expensive
Expand Down

0 comments on commit 9f1ec90

Please sign in to comment.