Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make ai a little more challanging 2/2 #436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 41 additions & 40 deletions scripts/ai/land_attack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function CreateAiLandAttack(sleep_factor, max_force)
function() return AiNeed(AiBarracks()) end,
function() return AiNeed(AiLumberMill()) end,
function() return AiWait(AiBarracks()) end,
function() return AiForce(0, {AiSoldier(), 2}) end,
--function() return AiForce(0, {AiSoldier(), 2}) end,
--function() return AiForce(1, {AiSoldier(), 1}) end,
--function() return AiWaitForce(1) end,
--function() return AiAttackWithForce(1) end,
Expand All @@ -177,25 +177,25 @@ function CreateAiLandAttack(sleep_factor, max_force)
function () return GenerateRoads(true, false) end,

function() return AiSet(AiWorker(), 9) end,
function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiNeed(AiBlacksmith()) end,
function() return AiWait(AiWorker()) end,
function() return AiWait(AiLumberMill()) end,
function() return AiNeed(AiTower()) end,
function() return AiForce(0, {AiSoldier(), 2, AiShooter(), 1}) end,
--function() return AiForce(0, {AiSoldier(), 2, AiShooter(), 1}) end,
function() return AiForce(1, {AiSoldier(), 2, AiShooter(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiNeed(AiTower()) end,
function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiAttackWithForce(1) end,

function () return GenerateRoads(true, true) end,

function() return AiWait(AiBlacksmith()) end,
function() return AiResearch(AiUpgradeWeapon1()) end,
function() return AiResearch(AiUpgradeArmor1()) end,
function() return AiResearch(AiUpgradeMissile1()) end,
-- function() return AiWait(AiBlacksmith()) end,
--function() return AiResearch(AiUpgradeWeapon1()) end,
--function() return AiResearch(AiUpgradeArmor1()) end,
--function() return AiResearch(AiUpgradeMissile1()) end,
--function() return AiResearch(AiUpgradeWeapon2()) end,
--function() return AiResearch(AiUpgradeArmor2()) end,
--function() return AiResearch(AiUpgradeMissile2()) end,
Expand All @@ -204,111 +204,112 @@ function CreateAiLandAttack(sleep_factor, max_force)

function () return GenerateRoads(true, true) end,

function() return AiForce(0, {AiSoldier(), 3, AiShooter(), 2}) end,
--function() return AiForce(0, {AiSoldier(), 3, AiShooter(), 2}) end,
function() return AiForce(1, {AiSoldier(), 3, AiShooter(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiSleep(600) end,
function() return AiAttackWithForce(1) end,

function() return AiSleep(500) end,
-- function() return AiSleep(500) end,
function() return AiSet(AiWorker(), 15) end,
function() return AiForce(0, {AiSoldier(), 3, AiShooter(), 2}) end,
--function() return AiForce(0, {AiSoldier(), 3, AiShooter(), 2}) end,
function() return AiForce(1, {AiSoldier(), 3, AiShooter(), 1, AiCatapult(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiAttackWithForce(1) end,

function () return GenerateRoads(true, true) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,

function() return AiForce(1, {AiSoldier(), 3, AiShooter(), 1, AiCatapult(), 1}) end,
function() return AiWaitForce(1) end,
function() return AiAttackWithForce(1) end,

function () return GenerateRoads(true, true) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiNeed(AiStables()) end,
function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1}) end,
function() return AiWait(AiStables()) end,
--function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1}) end,
function() return AiForce(1, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiCatapult(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiAttackWithForce(1) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiNeed(AiBarracks()) end,
function() return AiSet(AiWorker(), 19) end,

function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1}) end,
--function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1}) end,
function() return AiForce(1, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiCatapult(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiAttackWithForce(1) end,

function () return GenerateRoads(true, true) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiNeed(AiTemple()) end,
function() return AiResearch(AiMageSpell2()) end,
function() return AiResearch(AiMageSpell3()) end,

function () return GenerateRoads(true, true) end,

function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiMage(), 1, AiCatapult(), 1}) end,
--function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiMage(), 1, AiCatapult(), 1}) end,
function() return AiForce(1, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiMage(), 1, AiCatapult(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiAttackWithForce(1) end,

function () return GenerateRoads(true, true) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiNeed(AiMageTower()) end,
function() return AiResearch(AiSummonerSpell1()) end,
function() return AiResearch(AiSummonerSpell3()) end,

function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 3, AiMage(), 2, AiSummoner(), 2}) end,
--function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 3, AiMage(), 2, AiSummoner(), 2}) end,
function() return AiForce(1, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiCatapult(), 1, AiMage(), 1, AiSummoner(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiAttackWithForce(1) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiResearch(AiSummonerSpell2()) end,

function () return GenerateRoads(true, true) end,

function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1, AiMage(), 2, AiSummoner(), 2}) end,
--function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1, AiMage(), 2, AiSummoner(), 2}) end,
function() return AiForce(1, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiCatapult(), 1, AiMage(), 1, AiSummoner(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiAttackWithForce(1) end,

function () return GenerateRoads(true, true) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,

function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1, AiMage(), 2, AiSummoner(), 2}) end,
--function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1, AiMage(), 2, AiSummoner(), 2}) end,
function() return AiForce(1, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiCatapult(), 1, AiMage(), 1, AiSummoner(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiAttackWithForce(1) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,

function () return GenerateRoads(true, true) end,

function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1, AiMage(), 2, AiSummoner(), 5}) end,
--function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1, AiMage(), 2, AiSummoner(), 5}) end,
function() return AiForce(1, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiCatapult(), 1, AiMage(), 1, AiSummoner(), 1}) end,
function() return AiWaitForce(0) end,
--function() return AiWaitForce(0) end,
function() return AiWaitForce(1) end,
function() return AiAttackWithForce(0) end,
--function() return AiAttackWithForce(0) end,
function() return AiAttackWithForce(1) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiForce(0, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 3, AiCatapult(), 1, AiMage(), 2, AiSummoner(), 5}) end,
function() return AiForce(1, {AiSoldier(), 1, AiShooter(), 2, AiCavalry(), 2, AiCatapult(), 1, AiMage(), 1, AiSummoner(), 1}) end,
function() return AiWaitForce(0) end,
Expand All @@ -318,7 +319,7 @@ function CreateAiLandAttack(sleep_factor, max_force)

function () return GenerateRoads(true, true) end,

function() return AiSleep(500) end,
--function() return AiSleep(500) end,
function() return AiSet(AiWorker(), 25) end,

-- Everything researched...
Expand Down