Skip to content
Permalink
Browse files

made DAI Zaal more swarm'ish

  • Loading branch information...
Damgam committed Jul 6, 2019
1 parent 5cb6471 commit 200b8551f9b321d282c38d841aa41f169af02308
Showing with 34 additions and 25 deletions.
  1. +34 −25 LuaRules/Gadgets/ai/EvoRTS/taskqueues.lua
@@ -1036,35 +1036,44 @@ end


local function ZaalUnitLists(tqb, ai, unit)
--GG.TechCheck("techX", ai.id)
local techs = 0
if GG.TechCheck("tech1", ai.id) then techs = techs + 1 end
if GG.TechCheck("tech2", ai.id) then techs = techs + 1 end
if GG.TechCheck("tech3", ai.id) then techs = techs + 1 end
--local hivecount = Spring.GetTeamUnitDefCount(ai.id, UnitDefNames.zhive.id) - UUDC("zhive", ai.id)
--Spring.Echo(hivecount.." hives for team "..ai.id)
local r = math.random(1,techs)

local r = math.random(0,10)
if GG.TechCheck("tech3", ai.id) then
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter", "zairtogroundfighter", "zairbomber", "zarty", "zassault", "zkamikaze", "zskirmisher", "zpyro", "zqueen",}
return FindBest(options, ai)

if r <= 3 then
return "zlightswarm"
elseif r <= 6 then
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter",}
return FindBest(options, ai)
elseif r <= 9 then
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter", "zairtogroundfighter", "zairbomber", "zarty", "zassault", "zkamikaze", "zskirmisher", "zpyro",}
return FindBest(options, ai)
else
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter", "zairtogroundfighter", "zairbomber", "zarty", "zassault", "zkamikaze", "zskirmisher", "zpyro", "zqueen",}
return FindBest(options, ai)
end

elseif GG.TechCheck("tech2", ai.id) then
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter", "zairtogroundfighter", "zairbomber", "zarty", "zassault", "zkamikaze", "zskirmisher", "zpyro",}
return FindBest(options, ai)

if r <= 6 then
return "zlightswarm"
elseif r <= 9 then
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter",}
return FindBest(options, ai)
else
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter", "zairtogroundfighter", "zairbomber", "zarty", "zassault", "zkamikaze", "zskirmisher", "zpyro",}
return FindBest(options, ai)
end

elseif GG.TechCheck("tech1", ai.id) then
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter",}
return FindBest(options, ai)
end

--local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter", "zairtogroundfighter", "zairbomber", "zarty", "zassault", "zkamikaze", "zskirmisher", "zpyro", "zqueen",}
--
--if GG.TechCheck("1 hive", ai.id) then
-- local build = random{zlightswarm, zairscout}
-- return build
--local build = {"zlightswarm"}
--return FindBest(build, ai)

--end
if r <= 9 then
return "zlightswarm"
else
local options = {"zlightswarm", "zairscout", "zmedswarm", "zairtoairfighter",}
return FindBest(options, ai)
end

end
end

local function ZaalArmLists(tqb, ai, unit)

0 comments on commit 200b855

Please sign in to comment.
You can’t perform that action at this time.