Permalink
Browse files

DAI tweaks

  • Loading branch information...
Damgam committed Oct 7, 2018
1 parent 9e86a4e commit df59f844c9b25f818a94dbfc9217954b66ce145e
Showing with 68 additions and 3 deletions.
  1. +3 −3 LuaRules/Gadgets/ai/EvoRTS/attackerbehaviour.lua
  2. +65 −0 LuaRules/Gadgets/ai/EvoRTS/taskqueues.lua
@@ -81,8 +81,8 @@ function AttackerBehaviour:AttackCell(cell)
local closestUnit = Spring.GetUnitNearestEnemy(unitID, 50000, false)
local ex,ey,ez = Spring.GetUnitPosition(closestUnit)
local enemyDis = Spring.GetUnitSeparation(unitID,closestUnit)
if (currenthealth >= maxhealth or currenthealth > 3000) then
if enemyDis < 2000 then
if (currenthealth >= maxhealth or currenthealth > 3000) and closestUnit then
if enemyDis < 1500 then
Spring.GiveOrderToUnit(unitID, CMD.CLOAK, { 1 }, {})
else
Spring.GiveOrderToUnit(unitID, CMD.CLOAK, { 0 }, {})
@@ -103,7 +103,7 @@ function AttackerBehaviour:AttackCell(cell)
--retreat
else
local nanotcx, nanotcy, nanotcz = GG.GetClosestNanoTC(unitID)
if enemyDis < 2000 then
if enemyDis < 1500 then
Spring.GiveOrderToUnit(unitID, CMD.CLOAK, { 1 }, {})
else
Spring.GiveOrderToUnit(unitID, CMD.CLOAK, { 0 }, {})
@@ -681,9 +681,16 @@ local overseerlistfirst = {
"emetalextractor",
"emetalextractor",
"emetalextractor",
"escoutdrone",
"elifterai",
"eturretlightai",
"escoutdrone",
"elifterai",
"eturretlightai",
"escoutdrone",
"elifterai",
"eturretlightai",
"escoutdrone",
}
local overseerorders = {
@@ -764,6 +771,63 @@ local lifterstart = {
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
"emetalextractor",
}
local unitsqueue = {
@@ -801,6 +865,7 @@ end
local function lifterqueue()
if liftersqueued > 1 then
liftersqueued = liftersqueued - 0.2
return lifterlist
else
liftersqueued = liftersqueued + 1

0 comments on commit df59f84

Please sign in to comment.