global Map =
{

  East_Anti_Tank_Gun_Destroyed = function( trigger )
  {
    print( "East_Anti_Tank_Gun_Destroyed" );
  },

  West_Anti_Tank_Gun_Destroyed = function( trigger )
  {
    print( "West_Anti_Tank_Gun_Destroyed" );
  },

  beach_Flag1_Axis_Captured = function( trigger )
  {
    print( "beach_Flag1_Axis_Captured" );
  },

  beach_Flag1_Allies_Captured = function( trigger )
  {
    print( "beach_Flag1_Allies_Captured" );
  },

};

global OnMapLoad = function()
{
  OnTrigger( "MISSING_STRING", Map.East_Anti_Tank_Gun_Destroyed );
  OnTrigger( "MISSING_STRING", Map.West_Anti_Tank_Gun_Destroyed );
  OnTrigger( "MISSING_STRING", Map.beach_Flag1_Axis_Captured );
  OnTrigger( "MISSING_STRING", Map.beach_Flag1_Allies_Captured );

  SetAvailableMapGoals( TEAM.ALLIES, false, {
  	"REPAIRMG42_.*",
  	"CALLARTILLERY_251",
  	"CALLARTILLERY_252",
  	"MOUNTMG42_.*",
  	"DEFEND_.*",
  });

  SetGoalPriority( "DEFEND_.*", 0.54 );

  Util.SetMaxUsersInProgress( 1, "DEFEND_.*" );
  Util.SetMaxUsersInProgress( 2, "ATTACK_.*" );
  Util.SetMaxUsersInProgress( 1, "MOUNTMG42_.*" );
  Util.SetMaxUsersInProgress( 2, "CHECKPOINT_.*" );

  SetMapGoalProperties( "ATTACK_.*", {mincamptime=1, maxcamptime=30} );
  SetMapGoalProperties( "DEFEND_.*", {mincamptime=5, maxcamptime=40} );
  SetMapGoalProperties( "SNIPE_.*", {mincamptime=5, maxcamptime=40} );
  SetMapGoalProperties( "MOUNTMG42_.*", {mincamptime=10, maxcamptime=300} );

  print( "Omni-bot script for Bloody Omaha loaded." );
};

global OnBotJoin = function( bot )
{
  bot.MaxViewDistance = 4500;
  if ( bot.GetTeam() == TEAM.ALLIES )
  {
    bot.TargetBreakableDist = 300.0;
  }
};
