global Map =
{
	Bridge_Built = function()
	{
		Util.MapDebugPrint( "Bridge_Built" );
	},

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

	Main_Gate_Destroyed = function()
	{
	Util.DisableGoal("BUILD_Bridge");
	Util.DisableGoal("PLANT_Bridge");
	SetAvailableMapGoals( TEAM.AXIS, false, "SNIPE.*" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_axis_base.*" );

		Util.MapDebugPrint( "Main_Gate_Destroyed" );
	},

	Side_Wall_Destroyed = function()
	{
	SetAvailableMapGoals( TEAM.ALLIES, false, "MOVER_tank" );
	Util.DisableGoal("BUILD_Tank");
	Util.DisableGoal("PLANT_Command_Post");

		Util.MapDebugPrint( "Side_Wall_Destroyed" );
	},

	Tank_Built = function()
	{

		SetAvailableMapGoals( TEAM.AXIS, false, "SNIPE_axis_base" );

		Util.MapDebugPrint( "Tank_Built" );
	},

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

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

	docs_Taken = function()
	{
		SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_axis_base.*" );
		SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_capdef.*" );
		Util.MapDebugPrint( "docs_Taken" );
	},

	docs_Returned = function()
	{
		SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_axis_base.*" );
		SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_capdef.*" );
		Util.MapDebugPrint( "docs_Returned" );
	},

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

};

global OnMapLoad = function()
{
	OnTrigger( "The Bridge has been constructed.", Map.Bridge_Built );
	OnTrigger( "Allied Command Post constructed. Charge speed increased!", Map.Command_Post_Built );
	OnTrigger( "Allied team has destroyed the Main gate!", Map.Main_Gate_Destroyed );
	OnTrigger( "Allied team has destroyed the Side Wall!", Map.Side_Wall_Destroyed );
	OnTrigger( "Allies have stolen the tank", Map.Tank_Built );
	OnTrigger( "The Bridge has been destroyed.", Map.Bridge_Destroyed );
	OnTrigger( "Axis team has destroyed the Allied Command Post!", Map.Command_Post_Destroyed );
	OnTrigger( "Allies have stolen the Supply Documents!", Map.docs_Taken );
	OnTrigger( "Axis have returned the Supply Documents!", Map.docs_Returned );
	OnTrigger( "The Allies have transmitted the Supply Documents!", Map.Documents_Captured );

	SetAvailableMapGoals( TEAM.AXIS, false, {
		"DEFEND.*",
		"CALLARTILLERY_404",
	});
	SetAvailableMapGoals( TEAM.ALLIES, false, {
		"SNIPE.*",
		"CALLARTILLERY_404",
		"DEFEND.*",
	});

	Util.MapDebugPrint( "OnMapLoad" );
};
