//==========================================================================================
//
//	fragmaze_hd.gm
//
//	Who                  	When		What
//------------------------------------------------------------------------------------------
//	^8u^7G^8c^7'^8P^7i^8n^7n	28 July 2023	waypoints without script
//	palota	29 June 2025	initial script
//==========================================================================================
//

global Map =
{
	Safe_Destroyed = function()
	{
		SetAvailableMapGoals(TEAM.ALLIES, true, "FLAG.*");
		Util.MapDebugPrint("Axis_Safe_Destroyed");
	},

	Allied_Command_Post_Built = function()
	{
		SetAvailableMapGoals(TEAM.ALLIES, false, "BUILD_Allied_Command_Post.*");
		Util.MapDebugPrint("Allied_Command_Post_Built");
	},

	Allied_Command_Post_Destroyed = function()
	{
		SetAvailableMapGoals(TEAM.ALLIES, true, "BUILD_Allied_Command_Post");
		Util.MapDebugPrint("Allied_Command_Post_Destroyed");
	},
};

global OnMapLoad = function()
{
	OnTrigger("Allies have destroyed the ^3Safe Door^1 !", Map.Safe_Destroyed);
	OnTrigger("Allied Command Post constructed. Charge speed increased!", Map.Allied_Command_Post_Built);
	OnTrigger("Axis team has destroyed the Allied Command Post!", Map.Allied_Command_Post_Destroyed);

	SetAvailableMapGoals(TEAM.ALLIES, false, "FLAG.*");

	SetGoalPriority("BUILD_Allied_Command_Post.*", 0.81);
	SetGoalPriority("DEFUSE_Allied_Command_Post.*", 0.6, 0, 0, true);

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