[Change] Made ai a *little* less dumb.
This commit is contained in:
parent
744970b9ef
commit
9710d7721b
@ -45,9 +45,9 @@ function attack()
|
|||||||
is.shoot(2)
|
is.shoot(2)
|
||||||
end
|
end
|
||||||
|
|
||||||
if dir < 10 and dist > 300 then
|
if dir < 10 and dist > 200 then
|
||||||
ai.accel()
|
ai.accel()
|
||||||
elseif dir < 10 and dist < 300 then
|
elseif dir < 10 and dist < 200 then
|
||||||
ai.shoot()
|
ai.shoot()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ function control()
|
|||||||
task = ai.taskname()
|
task = ai.taskname()
|
||||||
|
|
||||||
enemy = ai.getenemy()
|
enemy = ai.getenemy()
|
||||||
if enemy ~= 0 then
|
if task ~= "attack" and enemy ~= 0 then
|
||||||
ai.pushtask(0, "attack", enemy)
|
ai.pushtask(0, "attack", enemy)
|
||||||
elseif task == "none" then
|
elseif task == "none" then
|
||||||
planet = ai.rndplanet()
|
planet = ai.rndplanet()
|
||||||
|
Loading…
Reference in New Issue
Block a user