//==========================================================================================
//
//	heli_m1.gm
//
//	Who  	When		What
//------------------------------------------------------------------------------------------
//	^4Tardis	07 June 2014	Initial Script
//
//==========================================================================================
//

global Map =
{
	FlagStatus = 0, //no team owns it initially


	minicp_Built = function()
	{
		Util.MapDebugPrint( "minicp_Built" );
	},

	Documents_Fence_Destroyed = function()
	{
		Util.MapDebugPrint( "Documents_Fence_Destroyed" );
	},

	minicp_Destroyed = function()
	{
		Util.MapDebugPrint( "minicp_Destroyed" );
	},

	access_codes_Taken = function()
	{
		Util.MapDebugPrint( "access_codes_Taken" );
	},

	access_codes_Returned = function()
	{
		Util.MapDebugPrint( "access_codes_Returned" );
	},

	access_codes_Secured = function()
	{
		Util.MapDebugPrint( "access_codes_Secured" );
	},

	castletop_flag_Axis_Captured = function()
	{
		Map.FlagStatus = 1;

		Util.MapDebugPrint( "castletop_flag_Axis_Captured" );
	},

	castletop_flag_Allies_Captured = function()
	{
		Map.FlagStatus = 2;
		Util.MapDebugPrint( "castletop_flag_Allies_Captured" );
	},

	heliport = function()
	{
		Util.DisableGoal( "CHECKPOINT.*" );
		Util.MapDebugPrint( "heliport time_is_up" );
	},
};

global OnMapLoad = function()
{
	OnTrigger( "The allies CP has been constructed!", Map.minicp_Built );
	OnTrigger( "Document fence is destroyed!", Map.Documents_Fence_Destroyed );
	OnTrigger( "The allies CP has been destroyed!", Map.minicp_Destroyed );
	OnTrigger( "The Allies have stolen Documents", Map.access_codes_Taken );
	OnTrigger( "The Axis have retrieved Documents", Map.access_codes_Returned );
	OnTrigger( "Allies win!", Map.access_codes_Secured );
	OnTrigger( "Axis Have Control of the Heliport Flag!", Map.castletop_flag_Axis_Captured );
	OnTrigger( "Allies Have Taken The Control of the Heliport!", Map.castletop_flag_Allies_Captured );
	OnTrigger( "Allies captured the Heliport^1!!", Map.heliport );

	Util.DisableGoal( "MOUNTMG42_.*" );

	Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed." );
};

global OnBotJoin = function( bot )
{
	bot.TargetBreakableDist = 90.0;
};
