//==========================================================================================
//
//	todesmarz.gm
//
//	Who                        	When		What
//------------------------------------------------------------------------------------------
//	^1C^2Y^3B^6E^5R^04^1W^2O^3L^6F	20 April 2022	incomplete waypoints
//	palota	4 August 2025	script, goals, roles, routes
//==========================================================================================
//

global Map =
{
	SaveRoles = 0,

	Roles =
	{
		AXIS =
		{
			DEFENDER =
			{
				numbots = 4
			}
		},
		ALLIES =
		{
			DEFENDER =
			{
				numbots = 4
			}
		}
	},
};

global OnMapLoad = function()
{
	Util.LimitToTeam(TEAM.AXIS, ".*_x.*");
	Util.LimitToTeam(TEAM.ALLIES, ".*_l.*");

	SetGoalPriority("PLANT_radio_equipment.*", 0.85);
	SetGoalRole("DEFEND.*", ROLE.DEFENDER);

	Util.SetMaxUsers(1, "BUILD.*");

	SetMapGoalProperties("ATTACK.*", {MinCampTime=10, MaxCampTime=50});
	SetMapGoalProperties("DEFEND.*", {MinCampTime=30, MaxCampTime=60});

	Util.SetGoalRange("BUILD_Axis_Command_Post", AABB(-3982.865,-3505.645,-94.525,-266.840,972.379,546.438));
	Util.SetGoalRange("BUILD_Allied_Command_Post", AABB(-4027.608,-1436.060,-37.410,-345.631,4141.401,597.865));
	Util.SetGoalRange("PLANT_Allied_Command_Post", AABB(-3982.865,-3505.645,-94.525,-266.840,972.379,546.438));
	Util.SetGoalRange("PLANT_Axis_Command_Post", AABB(-4027.608,-1436.060,-37.410,-345.631,4141.401,597.865));

	WeaponTable.SetWeaponAvailability(CLASS.SOLDIER, WEAPON.PANZERFAUST, false);

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

global InitializeRoutes = function()
{
	MapRoutes =
	{
		PLANT_radio_equipment =
		{
			ROUTE_allied_spawn =
			{
				ROUTE_allied_cp ={},
				ROUTE_west =
				{
					ROUTE_south_west ={},
				},
				ROUTE_north_east =
				{
					Weight=2,
					ROUTE_center ={},
					ROUTE_east ={},
					ROUTE_south_east ={},
				},
			},
		},
		PLANT_radio_equipment_1 =
		{
			ROUTE_axis_spawn =
			{
				ROUTE_axis_cp =
				{
					ROUTE_allied_cp ={},
					ROUTE_west =
					{
						ROUTE_north_west ={},
					},
				},
				ROUTE_south_west =
				{
					ROUTE_west ={},
				},
				ROUTE_east ={},
				ROUTE_center ={},
			},
		},
	};
	MapRoutes["ATTACK_x.*"] = MapRoutes.PLANT_radio_equipment_1;
	MapRoutes["ATTACK_l.*"] = MapRoutes.PLANT_radio_equipment;
	Util.Routes(MapRoutes);
};
