Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Trebuchets - match, prioritize vs catapults+, take into account fort totals
- CUpgradeStructure01 = {
- PriorityFunction = function(unit)
- local priority = 0
- local ourForts = unit:GetAIBrain():GetTeamArmy():GetListOfUnits(categories.FORT, false)
- if ourForts < 2 then
- return 0
- end
- local enemyForts = GetEnemyTeamBrain(unit):GetListOfUnits(categories.FORT, false)
- if EnemyHasUpgrade(unit, 'CTroopNumber04') and not TeamHasUpgrade(unit, 'CTroopNumber04') then
- priority = 15
- elseif EnemyHasUpgrade(unit, 'CUpgradeStructure02') then
- priority = 2 * enemyForts
- end
- return priority * ourForts * GoldThreshold(unit, UpgradeCost('CUpgradeStructure02'))
- end,
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement