--	Stratagus Map - Single player campaign

Load("campaigns/orc/level09o_c2.sms")

Briefing(
  title,
  objectives,
  "../campaigns/orc/interface/introscreen3.png",
  "campaigns/orc/level09o.txt",
  {"campaigns/orc/level09o-intro1.wav"}
)

Triggers = [[
AddTrigger(
  function() return GetNumUnitsAt(GetThisPlayer(), "unit-fortress", {52, 15}, {72, 40}) >0 and
    GetNumUnitsAt(GetThisPlayer(), "unit-orc-shipyard", {48, 20}, {69, 42}) >0 end,
  function() return ActionVictory() end)
AddTrigger(
  function() return (GetNumUnitsAt(GetThisPlayer(), "unit-fortress", {52, 15}, {72, 40}) >0) and
    (GetNumUnitsAt(GetThisPlayer(), "unit-orc-shipyard", {69, 31}, {74, 39}) >0 ) end,
  function() return ActionVictory() end)
AddTrigger(
  function() return (GetNumUnitsAt(GetThisPlayer(), "unit-fortress", {52, 15}, {72, 40}) >0) and
    (GetNumUnitsAt(GetThisPlayer(), "unit-orc-shipyard", {73, 13}, {76, 34}) >0 ) end,
  function() return ActionVictory() end)
AddTrigger(
  function() return (GetNumUnitsAt(GetThisPlayer(), "unit-fortress", {52, 15}, {72, 40}) >0) and
    (GetNumUnitsAt(GetThisPlayer(), "unit-orc-shipyard", {51, 16}, {58, 20}) >0 ) end,
  function() return ActionVictory() end)
AddTrigger(
  function() return (GetNumUnitsAt(GetThisPlayer(), "unit-fortress", {52, 15}, {72, 40}) >0) and
    (GetNumUnitsAt(GetThisPlayer(), "unit-orc-shipyard", {55, 12}, {75, 16}) >0 ) end,
  function() return ActionVictory() end)
AddTrigger(
  function() return GetPlayerData(GetThisPlayer(), "TotalNumUnits") == 0 end,
  function() return ActionDefeat() end)
]]

assert(loadstring(Triggers))()

--Units

--Townhall - Produces
DefineAllow("unit-peasant",			"FFFFFFFFFFFFFFFF")

DefineAllow("unit-peon",			"AAAAAAAAAAAAAAAA")

--Barracks - Produces
DefineAllow("unit-footman",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-archer",			"FFFFFFFFFFFFFFFF")
 DefineAllow("unit-ranger",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-knight",			"FFFFFFFFFFFFFFFF")
 DefineAllow("unit-paladin",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-ballista",			"FFFFFFFFFFFFFFFF")

DefineAllow("unit-grunt",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-axethrower",			"AAAAAAAAAAAAAAAA")
 DefineAllow("unit-berserker",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-ogre",			"AAAAAAAAAAAAAAAA")
 DefineAllow("unit-ogre-mage",			"AAAAAAAAAAAAAAAA")
  DefineAllow("unit-eye-of-vision",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-catapult",			"AAAAAAAAAAAAAAAA")

--Shipyard - Produces
DefineAllow("unit-human-oil-tanker",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-destroyer",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-transport",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-battleship",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-submarine",		"FFFFFFFFFFFFFFFF")

DefineAllow("unit-orc-oil-tanker",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-transport",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-destroyer",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-ogre-juggernaught",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-submarine",		"FFFFFFFFFFFFFFFF")

--Other Buildings
DefineAllow("unit-balloon",	"FFFFFFFFFFFFFFFF")
DefineAllow("unit-gryphon-rider",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-mage",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-dwarves",			"FFFFFFFFFFFFFFFF")

DefineAllow("unit-zeppelin",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dragon",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-death-knight",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-goblin-sappers",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-skeleton",			"FFFFFFFFFFFFFFFF")

--Human Specials
DefineAllow("unit-female-hero",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-flying-angel",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-white-mage",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-knight-rider",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-arthor-literios",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-wise-man",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-man-of-light",		"FFFFFFFFFFFFFFFF")

--Building Human
DefineAllow("unit-town-hall",			"FFFFFFFFFFFFFFFF")
 DefineAllow("unit-keep",			"FFFFFFFFFFFFFFFF")
 DefineAllow("unit-castle",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-barracks",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-farm",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-blacksmith",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-sword1",			"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-sword2",			"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-human-shield1",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-human-shield2",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-ballista1",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-ballista2",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-watch-tower",		"FFFFFFFFFFFFFFFF")
 DefineAllow("unit-human-guard-tower",		"FFFFFFFFFFFFFFFF")
 DefineAllow("unit-human-cannon-tower",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-elven-lumber-mill",           "FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-arrow1",                  "FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-arrow2",                  "FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-ranger",                  "FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-longbow",                 "FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-ranger-scouting",         "FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-ranger-marksmanship",     "FFFFFFFFFFFFFFFF")
DefineAllow("unit-church",			"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-paladin",			"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-holy-vision",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-healing",			"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-exorcism",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-stables",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-inventor",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-gryphon-aviary",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-shipyard",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-refinery",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-oil-platform",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-foundry",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-human-ship-cannon1",	"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-human-ship-cannon2",	"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-human-ship-armor1",	"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-human-ship-armor2",	"FFFFFFFFFFFFFFFF")
DefineAllow("unit-mage-tower",			"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-flame-shield",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-fireball",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-slow",			"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-invisibility",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-polymorph",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-blizzard",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-wall",			"FFFFFFFFFFFFFFFF")

-- Orc Specials
DefineAllow("unit-evil-knight",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-fad-man",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-beast-cry",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-fire-breeze",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-quick-blade",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-double-head",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-ice-bringer",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-sharp-axe",			"FFFFFFFFFFFFFFFF")


DefineAllow("unit-great-hall",			"AAAAAAAAAAAAAAAA")
 DefineAllow("unit-stronghold",			"AAAAAAAAAAAAAAAA")
 DefineAllow("unit-fortress",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-barracks",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-pig-farm",			"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-blacksmith",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-battle-axe1",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-battle-axe2",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-orc-shield1",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-orc-shield2",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-catapult1",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-catapult2",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-watch-tower",		"AAAAAAAAAAAAAAAA")
 DefineAllow("unit-orc-guard-tower",		"AAAAAAAAAAAAAAAA")
 DefineAllow("unit-orc-cannon-tower",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-troll-lumber-mill",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-throwing-axe1",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-throwing-axe2",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-berserker",		"AAAAAAAAAAAAAAAA")
  DefineAllow("upgrade-light-axes",		"AAAAAAAAAAAAAAAA")
  DefineAllow("upgrade-berserker-scouting",	"AAAAAAAAAAAAAAAA")
  DefineAllow("upgrade-berserker-regeneration",	"AAAAAAAAAAAAAAAA")
DefineAllow("unit-altar-of-storms",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-ogre-mound",			"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-ogre-mage",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-eye-of-kilrogg",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-bloodlust",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-runes",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-alchemist",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-dragon-roost",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-orc-shipyard",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-foundry",			"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-orc-ship-cannon1",	"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-orc-ship-cannon2",	"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-orc-ship-armor1",		"AAAAAAAAAAAAAAAA")
 DefineAllow("upgrade-orc-ship-armor2",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-temple-of-the-damned",	"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-death-coil",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-whirlwind",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-haste",			"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-unholy-armor",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-death-and-decay",		"FFFFFFFFFFFFFFFF")
 DefineAllow("upgrade-raise-dead",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-orc-refinery",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-oil-platform",		"AAAAAAAAAAAAAAAA")
DefineAllow("unit-orc-wall",			"FFFFFFFFFFFFFFFF")

-- Specials
DefineAllow("unit-daemon",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-critter",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-gold-mine",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-oil-patch",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-circle-of-power",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-dark-portal",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-runestone",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-human-dead-body",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-orc-dead-body",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-dead-sea-body",			"FFFFFFFFFFFFFFFF")
DefineAllow("unit-destroyed-1x1-place",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-destroyed-2x2-place",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-destroyed-3x3-place",		"FFFFFFFFFFFFFFFF")
DefineAllow("unit-destroyed-4x4-place",		"FFFFFFFFFFFFFFFF")

Load("campaigns/orc/level09o.sms")
