--__________         __    __  .__           ___________
--\______   \_____ _/  |__/  |_|  |   ____   \_   _____/__________
-- |    |  _/\__  \\   __\   __\  | _/ __ \   |    __)/  _ \_  __ \
-- |    |   \ / __ \|  |  |  | |  |_\  ___/   |     \(  <_> )  | \/
-- |______  /(____  /__|  |__| |____/\___  >  \___  / \____/|__|
--        \/      \/                     \/       \/
--   _____                     .___.__
--  /     \ _____    ____    __| _/|__| ____  ___________
-- /  \ /  \\__  \  /    \  / __ | |  |/ ___\/  _ \_  __ \
--/    Y    \/ __ \|   |  \/ /_/ | |  \  \__(  <_> )  | \/
--\____|__  (____  /___|  /\____ | |__|\___  >____/|__|
--        \/     \/     \/      \/         \/

--      ai.lua - AI definations
--
--      (c) Copyright 2005 by Kimmo Merikivi
--
--      This program is free software; you can redistribute it and/or modify
--      it under the terms of the GNU General Public License as published by
--      the Free Software Foundation; either version 2 of the License, or
--      (at your option) any later version.
-- 
--      This program is distributed in the hope that it will be useful,
--      but WITHOUT ANY WARRANTY; without even the implied warranty of
--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
--      GNU General Public License for more details.
--
--      You should have received a copy of the GNU General Public License
--      along with this program; if not, write to the Free Software
--      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



race1 = "dwarves"
race2 = "darkness"
race3 = "gnomes"
race4 = "humans"


DefineAiHelper(
	{"build", "unit-dwarves-worker",
		"unit-dwarves-town-center", "unit-dwarves-cottage", "unit-dwarves-guard-tower",
		"unit-dwarves-market",
		"unit-dwarves-blacksmith", "unit-dwarves-lumber-mill"},
	{"build", "unit-dwarves-advanced-worker",
		"unit-dwarves-town-center", "unit-dwarves-cottage", "unit-dwarves-guard-tower",
		"unit-dwarves-market",  "unit-dwarves-blacksmith", "unit-dwarves-lumber-mill",
		"unit-dwarves-farm", "unit-dwarves-barracks", "unit-dwarves-stone-wall", 
		"unit-dwarves-shipyard", "unit-dwarves-bunker"},
	{"build", "unit-darkness-worker",
		"unit-darkness-camp", "unit-darkness-farm", "unit-darkness-garrison",
		"unit-darkness-blacksmith", "unit-darkness-lumber-storage"},

	{"train", "unit-dwarves-cottage", "unit-raven"},
	{"train", "unit-dwarves-farm", "unit-raven"},
	{"train", "unit-dwarves-town-center", "unit-dwarves-worker", "unit-dwarves-advanced-worker"},
	{"train", "unit-dwarves-town-hall", "unit-dwarves-worker", "unit-dwarves-advanced-worker"},
	{"train", "unit-dwarves-guard-tower",
		"unit-dwarves-warrior", "unit-dwarves-scout", "unit-dwarves-bowman", "unit-dwarves-swordman",
		"unit-dwarves-advanced-bowman"},
	{"train", "unit-dwarves-barracks",
		"unit-dwarves-warrior", "unit-dwarves-scout", "unit-dwarves-bowman", "unit-dwarves-swordman",
		"unit-dwarves-advanced-warrior", "unit-dwarves-ballista", "unit-dwarves-advanced-bowman",
		"unit-dwarves-spearman"},
	{"train", "unit-darkness-camp", "unit-darkness-worker"},
	{"train", "unit-darkness-garrison", "unit-darkness-warrior", "unit-darkness-spearman",
		"unit-darkness-bowman"},

	{"upgrade", "unit-dwarves-town-center", "unit-dwarves-town-hall"},

	{"research", "unit-dwarves-blacksmith",
		"upgrade-dwarves-bowman", "upgrade-dwarves-swordman", "upgrade-dwarves-steel",
		"upgrade-dwarves-axe1", "upgrade-dwarves-armor1", "upgrade-dwarves-better-bows",
		"upgrade-dwarves-crossbows", "upgrade-dwarves-axe2", "upgrade-dwarves-better-swords",
		"upgrade-dwarves-spears", "upgrade-dwarves-daggers", "upgrade-dwarves-axes"},
	{"research", "unit-dwarves-town-center",
		"upgrade-dwarves-level2", "upgrade-dwarves-level3"},
	{"research", "unit-dwarves-cottage",
		"upgrade-dwarves-agriculture"},
	{"research", "unit-dwarves-town-hall",
		"upgrade-dwarves-advanced-worker", "upgrade-dwarves-stone-working",
		"upgrade-dwarves-level3"},
	{"research", "unit-darkness-camp",
		"upgrade-darkness-level2"},
	{"research", "unit-darkness-blacksmith",
		"upgrade-darkness-better-swords", "upgrade-darkness-better-shields",
		"upgrade-darkness-swords", "upgrade-darkness-spears", "upgrade-darkness-bows",
		"upgrade-darkness-better-helmets"},

	{"repair", "unit-dwarves-worker",
		"unit-dwarves-town-center", "unit-dwarves-cottage", "unit-dwarves-blacksmith",
		"unit-dwarves-lumber-mill", "unit-dwarves-market", "unit-dwarves-guard-tower",
		"unit-dwarves-stone-wall", "unit-dwarves-town-hall", "unit-dwarves-farm",
		"unit-dwarves-barracks"},
	{"repair", "unit-dwarves-advanced-worker",
		"unit-dwarves-town-center", "unit-dwarves-cottage", "unit-dwarves-blacksmith",
		"unit-dwarves-lumber-mill", "unit-dwarves-market", "unit-dwarves-guard-tower",
		"unit-dwarves-stone-wall", "unit-dwarves-town-hall",
		"unit-dwarves-farm", "unit-dwarves-barracks"},
	{"repair", "unit-dwarves-advanced-worker2",
		"unit-dwarves-town-center", "unit-dwarves-cottage", "unit-dwarves-blacksmith",
		"unit-dwarves-lumber-mill", "unit-dwarves-market", "unit-dwarves-guard-tower",
		"unit-dwarves-stone-wall", "unit-dwarves-town-hall", "unit-dwarves-farm",
		"unit-dwarves-barracks"},
	{"repair", "unit-darkness-worker",
		"unit-darkness-camp", "unit-darkness-farm", "unit-darkness-garrison",
		"unit-darkness-blacksmith", "unit-darkness-lumber-storage"},

	{"unit-limit", "unit-dwarves-cottage", "food"},
	{"unit-limit", "unit-dwarves-farm", "food"},
	{"unit-limit", "unit-dwarves-farm2", "food"},
	{"unit-limit", "unit-darkness-farm", "food"},

	{"unit-equiv", "unit-dwarves-worker"},
	{"unit-equiv", "unit-dwarves-town-center", "unit-dwarves-town-hall"},
	{"unit-equiv", "unit-dwarves-warrior", "unit-dwarves-swordman"},
	{"unit-equiv", "unit-dwarves-bowman", "unit-dwarves-advanced-bowman"},
	{"unit-equiv", "unit-dwarves-cottage", "unit-dwarves-farm"},
	{"unit-equiv", "unit-dwarves-worker", "unit-dwarves-advanced-worker"})


Load("scripts/ai/passive.lua")
Load("scripts/ai/land_attack-dwarves.lua")
Load("scripts/ai/land_attack-darkness.lua")
