--	Stratagus Map - Single player campaign

Load("campaigns/orc-exp/levelx01o_c2.sms")

Briefing(
  title,
  objectives,
  "../campaigns/orc/interface/introscreen5.png",
  "campaigns/orc-exp/levelx01o.txt",
  {"campaigns/orc-exp/levelx01o-intro1.wav",
   "campaigns/orc-exp/levelx01o-intro2.wav",
   "campaigns/orc-exp/levelx01o-intro3.wav"}
)

-- FIXME: Check if units are destroyed.
AddTrigger(
  function() return GetPlayerData(GetThisPlayer(), "UnitTypesCount", "unit-beast-cry") == 1 and
    GetPlayerData(6, "UnitTypesCount", "unit-death-knight") == 0 and
    GetPlayerData(6, "UnitTypesCount", "unit-temple-of-the-damned") == 0 end,
  function() return ActionVictory() end)

AddTrigger(
  function() return GetPlayerData(GetThisPlayer(), "UnitTypesCount", "unit-beast-cry") == 0 and
    GetPlayerData(0, "UnitTypesCount", "unit-beast-cry") == 0 end,
  function() return ActionDefeat() end)

AddTrigger(
  function() return GetPlayerData(GetThisPlayer(), "TotalNumUnits") == 0 end,
  function() return ActionDefeat() end)

--Units
DefineAllowNormalHumanUnits("AAAAAAAAAAAAAAAA")
DefineAllowExtraHumanUnits("FFFFFFFFFFFFFFFF")
DefineAllowNormalOrcUnits("AAAAAAAAAAAAAAAA")
DefineAllowExtraOrcUnits("FFFFFFFFFFFFFFFF")
DefineAllowSpecialUnits("FFFFFFFFFFFFFFFF")

-- Default Spells Researched
DefineAllowHumanAlways()
DefineAllowOrcAlways()

Load("campaigns/orc-exp/levelx01o.sms")
