//==========================================================================================
//
//	bellum.gm
//
//	Who                  	When		What
//------------------------------------------------------------------------------------------
//	maker@bigsighstudios.com	21 November 2017	Initial Script
//
//==========================================================================================
//

global Map =
{
	Debug = 0,
	DefendingTeam = TEAM.AXIS,

	gate_Destroyed = function()
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_generator" );
		SetAvailableMapGoals( TEAM.ALLIES, false, {
			"SNIPE_.*",
			"ATTACK_.*",
		});

		SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_.*" );

		Util.MapDebugPrint( "gate_Destroyed" );
	},

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

global OnMapLoad = function()
{
	OnTrigger( "The Allies have destroyed the gate!", Map.gate_Destroyed );
	OnTrigger( "The Allies have destroyed the generator!", Map.generator_Destroyed );

	Util.DisableGoal( ".*", true );

	SetAvailableMapGoals( TEAM.AXIS, true, {
		"DEFEND_.*",
		"SNIPE_.*",
		"MOBILE.*",
		"AMMOCAB_.*",
		"HEALTHCAB_.*",
	});

	SetAvailableMapGoals( TEAM.ALLIES, true, {
		"ATTACK_.*",
		"SNIPE_.*",
		"PLANT_gate",
	});

	Util.AddUsePoint("PLANT_gate", Vec3(341,-876,0));

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