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

--      upgrade.lua - Upgrades and researchs for dwarves
--
--      (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

---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
--Time,gold,wood,oil,stone,iron,titanium
DefineUpgrade("upgrade-dwarves-daggers", "icon", "icon-dwarves-daggers",
  "costs", {   100,   500,     0,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-axes", "icon", "icon-dwarves-axes",
  "costs", {   200,   1000,     0,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-level2", "icon", "icon-dwarves-level2",
  "costs", {   500,   3000,     1000,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-bowman", "icon", "icon-dwarves-bowman",
  "costs", {   300,   2000,     750,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-swordman", "icon", "icon-dwarves-swordman",
  "costs", {   200,   3000,     500,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-advanced-worker", "icon", "icon-dwarves-advanced-worker",
  "costs", {   200,   2500,     250,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-agriculture", "icon", "icon-dwarves-agriculture",
  "costs", {   200,   2500,     500,     0,     250,     0,     0})
DefineUpgrade("upgrade-dwarves-steel", "icon", "icon-dwarves-steel",
  "costs", {   200,   2500,     500,     0,     0,     500,     0})
DefineUpgrade("upgrade-dwarves-stone-working", "icon", "icon-dwarves-stone-working",
  "costs", {   200,   5000,     0,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-axe1", "icon", "icon-dwarves-axe1",
  "costs", {   300,   3000,     0,     0,     0,     1000,     0})
DefineUpgrade("upgrade-dwarves-armor1", "icon", "icon-dwarves-armor1",
  "costs", {   300,   2000,     0,     0,     0,     1500,     0})
DefineUpgrade("upgrade-dwarves-armor2", "icon", "icon-dwarves-armor2",
  "costs", {   400,   4000,     0,     0,     0,     2500,     0})
DefineUpgrade("upgrade-dwarves-ships", "icon", "icon-dwarves-ships",
  "costs", {   500,   1500,     500,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-level3", "icon", "icon-dwarves-level3",
  "costs", {   1000,   10000,     2500,     0,     1000,     1000,     0})
DefineUpgrade("upgrade-dwarves-better-bows", "icon", "icon-dwarves-better-bows",
  "costs", {   400,   1500,     500,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-crossbows", "icon", "icon-dwarves-crossbow",
  "costs", {   500,   2500,     1000,     0,     0,     500,     0})
DefineUpgrade("upgrade-dwarves-axe2", "icon", "icon-dwarves-axe2",
  "costs", {   300,   3000,     0,     0,     0,     2000,     0})
DefineUpgrade("upgrade-dwarves-axe3", "icon", "icon-dwarves-axe3",
  "costs", {   500,   5000,     0,     0,     0,     5000,     0})
DefineUpgrade("upgrade-dwarves-better-swords", "icon", "icon-dwarves-better-swords",
  "costs", {   500,   4000,     0,     0,     0,     3000,     0})
DefineUpgrade("upgrade-dwarves-better-swords2", "icon", "icon-dwarves-better-swords2",
  "costs", {   600,   5000,     0,     0,     0,     4000,     0})
DefineUpgrade("upgrade-dwarves-spears", "icon", "icon-dwarves-spears",
  "costs", {   500,   4000,     0,     0,     0,     3000,     0})
DefineUpgrade("upgrade-dwarves-level4", "icon", "icon-dwarves-level4",
  "costs", {   1500,   20000,     5000,     0,     5000,     5000,     0})
DefineUpgrade("upgrade-dwarves-better-bows2", "icon", "icon-dwarves-better-bows2",
  "costs", {   400,   5000,     2500,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-better-arrows", "icon", "icon-dwarves-better-arrows",
  "costs", {   400,   5000,     500,     0,     0,     2000,     0})
DefineUpgrade("upgrade-dwarves-better-arrows2", "icon", "icon-dwarves-better-arrows2",
  "costs", {   400,   7500,     500,     0,     0,     2500,     0})
DefineUpgrade("upgrade-dwarves-better-food", "icon", "icon-dwarves-better-food",
  "costs", {   1000,   10000,     0,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-better-spears", "icon", "icon-dwarves-better-spears",
  "costs", {   400,   5000,     0,     0,     0,     5000,     0})
DefineUpgrade("upgrade-dwarves-better-shields", "icon", "icon-dwarves-better-shields",
  "costs", {   600,   7500,     0,     0,     0,     7500,     0})
DefineUpgrade("upgrade-dwarves-better-helmets", "icon", "icon-dwarves-better-helmets",
  "costs", {   700,   5000,     0,     0,     0,     5000,     0})
DefineUpgrade("upgrade-dwarves-healing", "icon", "icon-dwarves-healing",
  "costs", {   700,   5000,     0,     0,     0,     5000,     0})
DefineUpgrade("upgrade-dwarves-healing2", "icon", "icon-dwarves-healing",
  "costs", {   1100,   10000,     0,     0,     0,     5000,     0})
DefineUpgrade("upgrade-dwarves-fury", "icon", "icon-dwarves-fury",
  "costs", {   1000,   15000,     0,     0,     0,     5000,     0})
DefineUpgrade("upgrade-dwarves-advanced-worker2", "icon", "icon-dwarves-advanced-worker2",
  "costs", {   750,   10000,     0,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-hard-strike", "icon", "icon-dwarves-hard-strike",
  "costs", {   1,   1,     0,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-healing3", "icon", "icon-dwarves-healing",
  "costs", {   1,   1,     0,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-fury2", "icon", "icon-dwarves-fury",
  "costs", {   1,   1,     0,     0,     0,     0,     0})
DefineUpgrade("upgrade-dwarves-ballistas", "icon", "icon-dwarves-ballistas",
  "costs", {   600,   5000,     2500,     0,     0,     1000,     0})
DefineUpgrade("upgrade-dwarves-transporters", "icon", "icon-dwarves-transporters",
  "costs", {   800,   5000,     5000,     0,     0,     0,     0})



DefineModifier("upgrade-dwarves-swordman",
  {"apply-to", "unit-dwarves-warrior"}, {"convert-to", "unit-dwarves-swordman"})
DefineModifier("upgrade-dwarves-advanced-worker",
  {"apply-to", "unit-dwarves-worker"}, {"convert-to", "unit-dwarves-advanced-worker"})
DefineModifier("upgrade-dwarves-steel",
  {"piercing-damage", 2},
  {"armor", 1},
  {"apply-to", "unit-dwarves-swordman"}, {"apply-to", "unit-dwarves-warrior"}, {"apply-to", "unit-dwarves-spearman"},
  {"apply-to", "unit-dwarves-scout"})
DefineModifier("upgrade-dwarves-axe1",
  {"piercing-damage", 2},
  {"apply-to", "unit-dwarves-warrior"},
  {"apply-to", "unit-dwarves-advanced-warrior"})
DefineModifier("upgrade-dwarves-axe2",
  {"piercing-damage", 3},
  {"apply-to", "unit-dwarves-warrior"},
  {"apply-to", "unit-dwarves-advanced-warrior"})
DefineModifier("upgrade-dwarves-axe3",
  {"piercing-damage", 2},
  {"apply-to", "unit-dwarves-warrior"},
  {"apply-to", "unit-dwarves-advanced-warrior"})
DefineModifier("upgrade-dwarves-armor1",
  {"armor", 2},
  {"apply-to", "unit-dwarves-advanced-warrior"}, {"apply-to", "unit-dwarves-warrior"},
  {"apply-to", "unit-dwarves-scout"}, {"apply-to", "unit-dwarves-swordman"}, {"apply-to", "unit-dwarves-spearman"})
DefineModifier("upgrade-dwarves-armor2",
  {"armor", 2},
  {"apply-to", "unit-dwarves-advanced-warrior"}, {"apply-to", "unit-dwarves-warrior"},
  {"apply-to", "unit-dwarves-scout"}, {"apply-to", "unit-dwarves-swordman"}, {"apply-to", "unit-dwarves-spearman"},     {"apply-to", "unit-dwarves-crossbowman"}, {"apply-to", "unit-dwarves-crossbowman-hero"},
  {"apply-to", "unit-dwarves-spearman-hero"})
DefineModifier("upgrade-dwarves-stone-working",
  {"hit-points", 200},
  {"armor", 5},
  {"apply-to", "unit-dwarves-farm"}, {"apply-to", "unit-dwarves-blacksmith"},
  {"apply-to", "unit-dwarves-town-center"},
  {"apply-to", "unit-dwarves-town-hall"}, {"apply-to", "unit-dwarves-guard-tower"},
  {"apply-to", "unit-dwarves-barracks"}, {"apply-to", "unit-dwarves-market"})
DefineModifier("upgrade-dwarves-better-bows",
  {"apply-to", "unit-dwarves-bowman"}, {"convert-to", "unit-dwarves-advanced bowman"})
DefineModifier("upgrade-dwarves-better-swords",
  {"piercing-damage", 2},
  {"apply-to", "unit-dwarves-swordman"}, {"apply-to", "unit-dwarves-lord"}, {"apply-to", "unit-dwarves-warrior-hero"})
DefineModifier("upgrade-dwarves-better-swords2",
  {"piercing-damage", 2},
  {"apply-to", "unit-dwarves-swordman"}, {"apply-to", "unit-dwarves-lord"}, {"apply-to", "unit-dwarves-warrior-hero"})
DefineModifier("upgrade-dwarves-better-bows2",
  {"piercing-damage", 2},
  {"attack-range", 2},
  {"sight-range", 2},
  {"apply-to", "unit-dwarves-advanced-bowman"}, {"apply-to", "unit-dwarves-bowman"},
  {"apply-to", "unit-dwarves-crossbowman"}, {"apply-to", "unit-dwarves-bowman-hero"},
  {"apply-to", "unit-dwarves-crossbowman-hero"})
DefineModifier("upgrade-dwarves-better-arrows",
  {"piercing-damage", 2},
  {"apply-to", "unit-dwarves-advanced-bowman"}, {"apply-to", "unit-dwarves-bowman"},
  {"apply-to", "unit-dwarves-crossbowman"}, {"apply-to", "unit-dwarves-bowman-hero"},
  {"apply-to", "unit-dwarves-crossbowman-hero"})
DefineModifier("upgrade-dwarves-better-arrows2",
  {"piercing-damage", 2},
  {"apply-to", "unit-dwarves-advanced-bowman"}, {"apply-to", "unit-dwarves-bowman"},
  {"apply-to", "unit-dwarves-crossbowman"}, {"apply-to", "unit-dwarves-bowman-hero"},
  {"apply-to", "unit-dwarves-crossbowman-hero"})
DefineModifier("upgrade-dwarves-better-spears",
  {"piercing-damage", 1},
  {"apply-to", "unit-dwarves-spearman"}, {"apply-to", "unit-dwarves-spearman-hero"})
DefineModifier("upgrade-dwarves-better-shields",
  {"armor", 1},
  {"apply-to", "unit-dwarves-spearman"}, {"apply-to", "unit-dwarves-swordman"},
  {"apply-to", "unit-dwarves-spearman-hero"})
DefineModifier("upgrade-dwarves-better-food",
  {"hit-points", 20},
  {"apply-to", "unit-dwarves-advanced-worker"}, {"apply-to", "unit-dwarves-swordman"},
  {"apply-to", "unit-dwarves-advanced-warrior"}, {"apply-to", "unit-dwarves-spearman"},
  {"apply-to", "unit-dwarves-advanced-bowman"}, {"apply-to", "unit-dwarves-crossbowman"},
  {"apply-to", "unit-dwarves-warrior-hero"}, {"apply-to", "unit-dwarves-bowman-hero"},
  {"apply-to", "unit-dwarves-lord"}, {"apply-to", "unit-dwarves-crossbowman-hero"},
  {"apply-to", "unit-dwarves-spearman-hero"})
DefineModifier("upgrade-dwarves-better-helmets",
  {"armor", 1},
  {"apply-to", "unit-dwarves-advanced-worker"}, {"apply-to", "unit-dwarves-swordman"},
  {"apply-to", "unit-dwarves-advanced-warrior"}, {"apply-to", "unit-dwarves-spearman"},
  {"apply-to", "unit-dwarves-advanced-bowman"}, {"apply-to", "unit-dwarves-crossbowman"},
  {"apply-to", "unit-dwarves-warrior-hero"}, {"apply-to", "unit-dwarves-bowman-hero"},
  {"apply-to", "unit-dwarves-lord"}, {"apply-to", "unit-dwarves-crossbowman-hero"},
  {"apply-to", "unit-dwarves-spearman-hero"})
DefineModifier("upgrade-dwarves-advanced-worker2",
  {"apply-to", "unit-dwarves-advanced-worker"}, {"convert-to", "unit-dwarves-advanced-worker2"})

DefineAllow("unit-dwarves-worker",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-warrior",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-scout",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-bowman",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-swordman",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-advanced-worker",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-raven",				"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-town-center",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-guard-tower",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-cottage",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-blacksmith",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-lumber-mill",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-market",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-level2",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-bowman",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-swordman",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-advanced-worker",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-town-hall",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-lord",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-boat",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-farm",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-barracks",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-stone-wall",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-advanced-warrior",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-agriculture",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-steel",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-axe1",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-armor1",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-armor2",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-stone-working",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-ships",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-shipyard",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-level3",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-bows",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-crossbows",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-advanced-bowman",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-crossbowman",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-ballista",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-axe2",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-axe3",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-spearman",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-swords",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-swords2",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-spears",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-bunker",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-city-hall",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-level4",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-bows2",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-arrows",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-food",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-farm2",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-arrows2",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-spears",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-daggers",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-axes",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-shields",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-better-helmets",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-temple",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-blacksmith2",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-healing",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-healing2",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-fury",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-healer",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-crossbowman-hero",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-bowman-hero",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-warrior-hero",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-spearman-hero",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-heros-guild",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-mining-post",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-mining-post2",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-advanced-worker2",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-advanced-worker2",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-hard-strike",		"RRRRRRRRRRRRRRRR")
DefineAllow("unit-dwarves-scout-hero",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-healing3",			"RRRRRRRRRRRRRRRR")
DefineAllow("upgrade-dwarves-fury2",			"RRRRRRRRRRRRRRRR")
DefineAllow("unit-dwarves-healer-hero",			"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-ballistas",		"AAAAAAAAAAAAAAAA")
DefineAllow("upgrade-dwarves-transporters",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dwarves-transporter",			"AAAAAAAAAAAAAAAA")

DefineDependency("upgrade-dwarves-level2",
  {"unit-dwarves-lumber-mill", "unit-dwarves-town-center", "unit-dwarves-blacksmith", "unit-dwarves-market",
  "unit-dwarves-guard-tower", "unit-dwarves-cottage", "upgrade-dwarves-axes", "upgrade-dwarves-daggers"})
DefineDependency("upgrade-dwarves-level3",
  {"upgrade-dwarves-level2", "unit-dwarves-town-hall", "unit-dwarves-farm", "upgrade-dwarves-steel",
  "upgrade-dwarves-agriculture", "upgrade-dwarves-advanced-worker", "upgrade-dwarves-stone-working"})
DefineDependency("upgrade-dwarves-bowman",
  {"unit-dwarves-lumber-mill", "upgrade-dwarves-level2"})
DefineDependency("upgrade-dwarves-swordman",
  {"upgrade-dwarves-level2"})
DefineDependency("upgrade-dwarves-advanced-worker",
  {"upgrade-dwarves-level2", "unit-dwarves-market"})
DefineDependency("unit-dwarves-scout",
  {"unit-dwarves-blacksmith", "upgrade-dwarves-daggers"})
DefineDependency("unit-dwarves-warrior",
  {"unit-dwarves-blacksmith", "upgrade-dwarves-axes"})
DefineDependency("unit-dwarves-bowman",
  {"upgrade-dwarves-bowman", "unit-dwarves-lumber-mill", "unit-dwarves-blacksmith"})
DefineDependency("unit-dwarves-swordman",
  {"upgrade-dwarves-swordman", "unit-dwarves-blacksmith"})
DefineDependency("unit-dwarves-town-hall",
  {"upgrade-dwarves-level2"})
DefineDependency("unit-dwarves-advanced-worker",
  {"upgrade-dwarves-level2", "upgrade-dwarves-advanced-worker"})
DefineDependency("upgrade-dwarves-agriculture",
  {"upgrade-dwarves-level2"})
DefineDependency("unit-dwarves-farm",
  {"upgrade-dwarves-agriculture"})
DefineDependency("unit-dwarves-barracks",
  {"upgrade-dwarves-level2"})
DefineDependency("unit-dwarves-stone-wall",
  {"upgrade-dwarves-stone-working"})
DefineDependency("unit-dwarves-shipyard",
  {"upgrade-dwarves-ships"})
DefineDependency("unit-dwarves-boat",
  {"upgrade-dwarves-ships"})
DefineDependency("upgrade-dwarves-steel",
  {"upgrade-dwarves-level2"})
DefineDependency("upgrade-dwarves-axe1",
  {"upgrade-dwarves-steel"})
DefineDependency("upgrade-dwarves-armor1",
  {"upgrade-dwarves-steel"})
DefineDependency("upgrade-dwarves-armor2",
  {"upgrade-dwarves-armor1"})
DefineDependency("upgrade-dwarves-stone-working",
  {"upgrade-dwarves-level2"})
DefineDependency("upgrade-dwarves-ships",
  {"upgrade-dwarves-level3"})
DefineDependency("upgrade-dwarves-better-bows",
  {"upgrade-dwarves-level3"})
DefineDependency("upgrade-dwarves-crossbows",
  {"upgrade-dwarves-level3", "upgrade-dwarves-better-bows"})
DefineDependency("unit-dwarves-advanced-warrior",
  {"upgrade-dwarves-level2", "upgrade-dwarves-steel", "unit-dwarves-blacksmith"})
DefineDependency("unit-dwarves-advanced-bowman",
  {"upgrade-dwarves-level3", "upgrade-dwarves-better-bows", "unit-dwarves-lumber-mill", "unit-dwarves-blacksmith"})
DefineDependency("unit-dwarves-ballista",
  {"upgrade-dwarves-crossbows", "unit-dwarves-lumber-mill", "unit-dwarves-blacksmith", "upgrade-dwarves-ballistas"})
DefineDependency("unit-dwarves-crossbowman",
  {"upgrade-dwarves-crossbows", "unit-dwarves-lumber-mill", "unit-dwarves-blacksmith"})
DefineDependency("unit-dwarves-spearman",
  {"upgrade-dwarves-spears", "unit-dwarves-blacksmith"})
DefineDependency("upgrade-dwarves-axe2",
  {"upgrade-dwarves-steel", "upgrade-dwarves-level3", "upgrade-dwarves-axe1"})
DefineDependency("upgrade-dwarves-axe3",
  {"upgrade-dwarves-axe2"})
DefineDependency("upgrade-dwarves-better-swords",
  {"upgrade-dwarves-steel", "upgrade-dwarves-level3"})
DefineDependency("upgrade-dwarves-better-swords2",
  {"upgrade-dwarves-better-swords"})
DefineDependency("upgrade-dwarves-spears",
  {"upgrade-dwarves-steel", "upgrade-dwarves-level3"})
DefineDependency("unit-dwarves-bunker",
  {"upgrade-dwarves-level3"})
DefineDependency("unit-dwarves-city-hall",
  {"upgrade-dwarves-level3"})
DefineDependency("unit-dwarves-lord",
  {"upgrade-dwarves-level4"})
DefineDependency("upgrade-dwarves-level4",
  {"upgrade-dwarves-crossbows","upgrade-dwarves-level3", "unit-dwarves-city-hall", "upgrade-dwarves-ships",
  "upgrade-dwarves-spears", "unit-dwarves-mining-post"})
DefineDependency("upgrade-dwarves-better-bows2",
  {"upgrade-dwarves-better-bows", "upgrade-dwarves-level4"})
DefineDependency("upgrade-dwarves-better-arrows",
  {"upgrade-dwarves-better-bows2"})
DefineDependency("upgrade-dwarves-better-food",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-farm2",
  {"upgrade-dwarves-better-food"})
DefineDependency("upgrade-dwarves-better-arrows2",
  {"upgrade-dwarves-better-arrows"})
DefineDependency("upgrade-dwarves-better-spears",
  {"upgrade-dwarves-level4"})
DefineDependency("upgrade-dwarves-better-shields",
  {"upgrade-dwarves-level4"})
DefineDependency("upgrade-dwarves-better-helmets",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-temple",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-blacksmith2",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-healer",
  {"upgrade-dwarves-level4"})
DefineDependency("upgrade-dwarves-healing",
  {"upgrade-dwarves-level4"})
DefineDependency("upgrade-dwarves-healing2",
  {"upgrade-dwarves-healing"})
DefineDependency("upgrade-dwarves-fury",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-heros-guild",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-bowman-hero",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-crossbowman-hero",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-warrior-hero",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-spearman-hero",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-mining-post",
  {"upgrade-dwarves-level3"})
DefineDependency("unit-dwarves-mining-post2",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-advanced-worker2",
  {"upgrade-dwarves-advanced-worker2"})
DefineDependency("upgrade-dwarves-advanced-worker2",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-scout-hero",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-healer-hero",
  {"upgrade-dwarves-level4"})
DefineDependency("upgrade-dwarves-ballistas",
  {"upgrade-dwarves-level4"})
DefineDependency("upgrade-dwarves-transporters",
  {"upgrade-dwarves-level4"})
DefineDependency("unit-dwarves-transporter",
  {"upgrade-dwarves-transporters"})

