From 9710d7721b98ea5e0ed238f9bbedce8a2a51d2f4 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 16 Mar 2013 19:13:05 +0000 Subject: [PATCH] [Change] Made ai a *little* less dumb. --- scripts/ai/collective.lua | 4 ++-- scripts/ai/empire.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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()