diff --git a/scripts/ai/collective.lua b/scripts/ai/collective.lua index 8637c72..0071749 100644 --- a/scripts/ai/collective.lua +++ b/scripts/ai/collective.lua @@ -45,9 +45,9 @@ function attack() is.shoot(2) end - if dir < 10 and dist > 300 then + if dir < 10 and dist > 200 then ai.accel() - elseif dir < 10 and dist < 300 then + elseif dir < 10 and dist < 200 then ai.shoot() end end diff --git a/scripts/ai/empire.lua b/scripts/ai/empire.lua index 9550755..585bdc4 100644 --- a/scripts/ai/empire.lua +++ b/scripts/ai/empire.lua @@ -6,7 +6,7 @@ function control() task = ai.taskname() enemy = ai.getenemy() - if enemy ~= 0 then + if task ~= "attack" and enemy ~= 0 then ai.pushtask(0, "attack", enemy) elseif task == "none" then planet = ai.rndplanet()