//==========================================================================================
//
//	grotli_winter.gm
//
//	Who				When			What
//------------------------------------------------------------------------------------------
//	o-0._.0-o		11 September 2023	Initial Script
//					11 February  2024	update to Version 2
//					30 December  2024	update to Version 4
//	palota   		20 January 	 2025 	optimized priorities and routes, added waypoints to fix stuckages
//  o-0._.0-o		12 February  2025	Version 5, added routes to tankgate and some little fixes
//  		        17 February  2025   Axis Route to alliedvault and some SWITCH fixes
//  		        18 February  2025   Bug fix when allies didn't destroyed the main gate.
//  		        07 May 		 2025   Added some triggers for better gameplay.
//  				07 October	 2025   Version 7, 
//
//==========================================================================================
//

global Map =
{
	Debug = 0,

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

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

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

	Vault_room_door_Built = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, false, "FLAG_axis_gold1" );

		Util.MapDebugPrint( "Vault_room_door_Built" );
	},

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

	second_Tank_Barrier_Built = function( trigger )
	{
		SetAvailableMapGoals( TEAM.AXIS, false, "SMOKEBOMB_axisB_.*" );

		Util.MapDebugPrint( "second_Tank_Barrier_Built" );
	},

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

	Main_Gate_Planted = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, false, "SMOKEBOMB_alliesA_.*" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "MOBILEMG42_defendA_4" );

		Util.MapDebugPrint( "Main_Gate_Planted" );
	},

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

	Tank_Gate_Planted = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_art_.*" );
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"CHECKPOINT_forwardbunkerflag",
				"DEFEND_tankgate_.*",
				"DEFEND_flag_.*",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_art_.*" );

		Util.MapDebugPrint( "Tank_Gate_Planted" );
	},

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

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

	second_Tank_Barrier_Planted = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_chair_1" );

		Util.MapDebugPrint( "second_Tank_Barrier_Planted" );
	},

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

	Main_Gate_Defused = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"SMOKEBOMB_alliesA_1",
				"SMOKEBOMB_alliesA_3",
		});

		Util.MapDebugPrint( "Main_Gate_Defused" );
	},

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

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

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

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

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

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

	Main_Gate_Destroyed = function( trigger )
	{
		sleep(0.2);
		Wp.CheckBlockable();

		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"ATTACK_tankgate_.*",
				"ATTACK_flag_.*",
				"CHECKPOINT_forwardbunkerflag",
				"PLANT_Tank_Gate",
				"BUILD_Command_Post",
				"SWITCH_dj_.*",
				"SWITCH_smoke",
				"SWITCH_piano_.*",
				"SWITCH_phone_1",
				"HEALTHCAB_north_healthcabinet",
				"AMMOCAB_north_ammocabinet",
				"SMOKEBOMB_alliesA_3",
		});
		SetAvailableMapGoals( TEAM.ALLIES, false, {
				"ATTACK_maingate_.*",
				"SNIPE_alliesA_.*",
				"MOUNTMG42_mg42_a",
				"REPAIRMG42_mg42_a",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"CHECKPOINT_forwardbunkerflag",
				"DEFEND_tankgate_.*",
				"DEFEND_flag_.*",
				"MOBILEMG42_defendA_.*",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"DEFEND_maingate_.*",
				"PLANTMINE_mineA_.*",
				"SWITCH_phone_2",
				"SNIPE_axisA_.*",
				"MOUNTMG42_mg42_a",
				"REPAIRMG42_mg42_a",
		});

		DeleteTriggerRegion("SneakFlag");
		
		sleep(4);
		Util.BotChat(TEAM.AXIS, "vsay", VOICE.INCOMING, 1);
		Util.BotChat(TEAM.ALLIES, "vsay", VOICE.LETS_GO, 1);

		Util.MapDebugPrint( "Main_Gate_Destroyed" );
	},

	Side_Entrance_Destroyed = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"AMMOCAB_803",
				"HEALTHCAB_803",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"AMMOCAB_803",
				"HEALTHCAB_803",
		});

		Util.MapDebugPrint( "Side_Entrance_Destroyed" );
	},

	Tank_Gate_Destroyed = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"BUILD_Tank",
				"ESCORT_tank",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"BUILD_first_Tank_Barrier",
				"BUILD_second_Tank_Barrier",
		});

		Util.MapDebugPrint( "Tank_Gate_Destroyed" );

		DeleteTriggerRegion("SneakVault");
		
		sleep(4);
		Util.BotChat(TEAM.AXIS, "vsay", VOICE.DESTROY_VEHICLE, 1);
		Util.BotChat(TEAM.ALLIES, "vsay", VOICE.ESCORT_VEHICLE, 1);
	},

	Vault_room_door_Destroyed = function( trigger )
	{
		Wp.CheckBlockable();
		SetAvailableMapGoals( TEAM.ALLIES, true, "FLAG_axis_gold1" );
		SetGoalPriority( "PLANT_Vault_room_door", 0.85, TEAM.ALLIES, CLASS.COVERTOPS );

		DeleteTriggerRegion("SneakVault");
		
		sleep(3);
		Util.BotChat(TEAM.AXIS, "vsay", VOICE.DEFEND_OBJECTIVE, 1);

		Util.MapDebugPrint( "Vault_room_door_Destroyed" );
	},

	first_Tank_Barrier_Destroyed = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"HEALTHCAB_south_healthcabinet",
				"AMMOCAB_south_ammocabinet",
				"ESCORT_tank",
				"BUILD_Tank",
		});
		SetAvailableMapGoals( TEAM.ALLIES, false, "MOBILEMORTAR_attackA_1" );
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"HEALTHCAB_south_healthcabinet",
				"AMMOCAB_south_ammocabinet",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"MOBILEMORTAR_defendB_1",
				"DEFEND_firstbarrier_.*",
		});
		
		DeleteTriggerRegion("Tank_At_Barrier_1");
		
		Util.MapDebugPrint( "first_Tank_Barrier_Destroyed" );
	},

	second_Tank_Barrier_Destroyed = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"ESCORT_tank",
				"BUILD_Tank",
		});
		SetAvailableMapGoals( TEAM.ALLIES, false, {
				"SWITCH_dj_.*",
				"SWITCH_smoke",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, "SMOKEBOMB_axisB_.*" );
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"SWITCH_dj_.*",
				"SWITCH_smoke",
				"SWITCH_piano_.*",
		});
		
		DeleteTriggerRegion("Tank_At_Barrier_2");

		Util.MapDebugPrint( "second_Tank_Barrier_Destroyed" );
	},

	axis_gold1_Taken = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"CAPPOINT_truck",
				"REPAIRMG42_mg42_a",
		});
		
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"SWITCH_phone_3",
				"HEALTHCAB_south_healthcabinet",
				"AMMOCAB_south_ammocabinet",
		});

		Util.MapDebugPrint( "axis_gold1_Taken" );
	},

	axis_gold1_Returned = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"PLANT_Vault_room_door",
				"PLANT_Side_Entrance",
				"ATTACK_gold_.*",
				"SWITCH_garage_3",
		});
		SetAvailableMapGoals( TEAM.ALLIES, false, {
				"ATTACK_alliedvault_.*",
				"SNIPE_alliesA_.*",
				"DEFEND_art_.*",
				"REPAIRMG42_mg42_a",
				"MOUNTMG42_mg42_a",
				"SWITCH_garage_1",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"PLANTMINE_mineB_.*",
				"DEFEND_gold_.*",
				"DEFEND_axistunnel_.*",
				"BUILD_Side_Entrance",
				"BUILD_Vault_room_door",
				"MOBILEMG42_defendB_.*",
				"MOUNTMG42_mg42_.*",
				"REPAIRMG42_mg42_.*",
				"SNIPE_axisB_.*",
				"SWITCH_phone_3",
				"HEALTHCAB_south_healthcabinet",
				"AMMOCAB_south_ammocabinet",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"PLANTMINE_mineA_.*",
				"DEFEND_alliedvault_.*",
				"ATTACK_tankgate_.*",
				"ATTACK_maingate_.*",
				"ATTACK_alliedvault_.*",
		});

		Util.MapDebugPrint( "axis_gold1_Returned" );
	},

	axis_gold1_Secured = function( trigger )
	{
		SetAvailableMapGoals( TEAM.AXIS, false, "PLANTMINE_mineA_.*" );

		sleep(1);
		ETUtil.WinningChat( TEAM.ALLIES );
		sleep(1.5);
		ETUtil.LosingChat( TEAM.AXIS );

		Util.MapDebugPrint( "axis_gold1_Secured" );
	},

	forwardbunkerflag_Axis_Captured = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, "CHECKPOINT_forwardbunkerflag" );

		SetAvailableMapGoals( TEAM.AXIS, true, {
				"MOBILEMG42_defendA_.*",
				"DEFEND_chair_1",
				"DEFEND_tankgate_.*",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_alliedvault_.*" );

		Util.MapDebugPrint( "forwardbunkerflag_Axis_Captured" );
	},

	forwardbunkerflag_Allies_Captured = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"SWITCH_garage_2",
				"DEFEND_chair_1",
				"ATTACK_tankgate_.*",
				"PLANT_Main_Gate",
				"PLANT_Tank_Gate",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"CHECKPOINT_forwardbunkerflag",
				"DEFEND_flag_.*",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"MOBILEMG42_defendA_.*",
				"AIRSTRIKE_defendA",
		});

		Util.MapDebugPrint( "forwardbunkerflag_Allies_Captured" );
	},

	Tank_stolen = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, false, {
				"SMOKEBOMB_alliesA_.*",
				"MOUNTMG42_mg42_a",
				"AMMOCAB_803",
				"HEALTHCAB_803",
				"ATTACK_maingate_.*",
				"SNIPE_alliesA_.*",
				"REPAIRMG42_mg42_a",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"DEFEND_tankgate_.*",
				"DEFEND_flag_.*",
				"PLANTMINE_mineB_.*",
				"MOUNTMG42_mg42_b",
				"REPAIRMG42_mg42_b",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"DEFEND_art_.*",
				"GRENADE_mg42_01",
				"AMMOCAB_803",
				"HEALTHCAB_803",
				"DEFEND_chair_1",
				"PLANTMINE_mineA_.*",
				"SWITCH_phone_2",
				"SNIPE_axisA_.*",
				"DEFEND_maingate_.*",
		});

		Util.MapDebugPrint( "Tank_stolen" );
	},

	Tank_outside = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"PLANT_first_Tank_Barrier",
				"ATTACK_firstbarrier_.*",
				"ATTACK_secondbarrier_.*",
				"SNIPE_alliesB_.*",
				"SMOKEBOMB_alliesB_.*",
				"GRENADE_mg42_02",
				"MOBILEMORTAR_attackA_1",
		});
		SetAvailableMapGoals( TEAM.ALLIES, false, {
				"ATTACK_flag_.*",
				"ATTACK_tankgate_.*",
				"CHECKPOINT_forwardbunkerflag",
				"SWITCH_phone_2",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"DEFEND_firstbarrier_.*",
				"DEFEND_secondbarrier_.*",
				"BUILD_Vault_room_door",
				"BUILD_Side_Entrance",
				"SWITCH_phone_3",
				"SWITCH_tap",
				"MOBILEMG42_defendB_.*",
				"REPAIRMG42_mg42_b",
				"MOBILEMORTAR_defendB_1",
				"SNIPE_axisB_.*",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"DEFEND_flag_.*",
				"DEFEND_maingate_.*",
				"DEFEND_tankgate_.*",
				"PLANT_Command_Post",
				"BUILD_Command_Post",
				"SWITCH_garage_2",
				"MOBILEMG42_defendA_.*",
				"HEALTHCAB_north_healthcabinet",
				"AMMOCAB_north_ammocabinet",
		});

		Util.MapDebugPrint( "Tank_outside" );
	},

	Tank_inside = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, {
				"ATTACK_gold_.*",
				"PLANT_Side_Entrance",
				"SWITCH_garage_3",
		});
		SetAvailableMapGoals( TEAM.ALLIES, false, {
				"ATTACK_firstbarrier_.*",
				"SMOKEBOMB_alliesB_.*",
				"ATTACK_tankgate_.*",
				"ATTACK_flag_.*",
				"MOBILEMORTAR_attackA_1",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, {
				"DEFEND_axistunnel_.*",
				"DEFEND_gold_.*",
				"SWITCH_tap",
				"SWITCH_garage_3",
		});
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"DEFEND_firstbarrier_.*",
				"SMOKEBOMB_axisB_.*",
				"MOBILEMORTAR_defendB_1",
		});

		DeleteTriggerRegion("SneakNearVault");
		Util.MapDebugPrint( "Tank_inside" );
	},

	Tank_end = function( trigger )
	{
		SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_Vault_room_door" );
		SetAvailableMapGoals( TEAM.ALLIES, false, {
				"ESCORT_tank",
				"BUILD_Tank",
				"GRENADE_mg42_02",
				"ATTACK_secondbarrier_.*",
		});
		SetAvailableMapGoals( TEAM.AXIS, true, "MOUNTMG42_mg42_a" );
		SetAvailableMapGoals( TEAM.AXIS, false, {
				"MOUNTMG42_mg42_b",
				"DEFEND_secondbarrier_.*",
		});
		
		Util.MapDebugPrint( "Tank_end" );
	},

	thirty_second = function( trigger )
	{
		Util.MapDebugPrint( "^5Thirty_second" );

		sleep(31);

		if ( !Map.Allies_Win )
		{
			ETUtil.WinningChat( TEAM.AXIS );
			sleep(1.5);
			ETUtil.LosingChat( TEAM.ALLIES );
		}
	},
	
	GoldTrigger1 =
	{
		Name = "GoldTrigger1",
		TriggerOnClass = CLASS.ANYPLAYER,
		OnEnter = function(ent)
		{
			if ( GetEntFlags(ent,ENTFLAG.CARRYINGGOAL) )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_tankgate_.*" );
				SetAvailableMapGoals( TEAM.AXIS, false, {
						"DEFEND_gold_.*",
						"DEFEND_alliedvault_.*",
				});
				SetAvailableMapGoals( TEAM.AXIS, true, {
						"ATTACK_tankgate_.*",
						"PLANTMINE_mineA_.*",
				});

				Util.MapDebugPrint(GetEntName(ent) + "^8Is Near The Grotli Tunnel With The Gold!");
			}
		},
		OnExit = function(ent)
		{
			if ( GetEntFlags(ent,ENTFLAG.CARRYINGGOAL) )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_tankgate_.*" );
				SetAvailableMapGoals( TEAM.AXIS, false, "ATTACK_tankgate_.*" );
				SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_alliedvault_.*" );
				
				Util.MapDebugPrint(GetEntName(ent) + "^3Is Near The Grotli Tunnel With The Gold!");
			}
		},
	},
	
	GoldTrigger2 =
	{
		Name = "GoldTrigger2",
		TriggerOnClass = CLASS.ANYPLAYER,
		OnEnter = function(ent)
		{
			if ( GetEntFlags(ent,ENTFLAG.CARRYINGGOAL) )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_maingate_.*" );

				Util.MapDebugPrint(GetEntName(ent) + "^8Is Near the Tank Gate With The Gold!");
			}
		},
		OnExit = function(ent)
		{
			if ( GetEntFlags(ent,ENTFLAG.CARRYINGGOAL) )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_alliedvault_.*" );
				SetAvailableMapGoals( TEAM.AXIS, false, {
				"PLANTMINE_mineA_.*",
				"ATTACK_maingate_.*",
			});
				
				Util.MapDebugPrint(GetEntName(ent) + "^3Is Near the Tank Gate With The Gold!");
			}
		},
	},
	
	GoldTrigger3 =
	{
		Name = "GoldTrigger3",
		TriggerOnClass = CLASS.ANYPLAYER,
		OnEnter = function(ent)
		{
			if ( GetEntFlags(ent,ENTFLAG.CARRYINGGOAL) )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_alliedvault_.*" );
				SetAvailableMapGoals( TEAM.AXIS, false, {
				"ATTACK_alliedvault_3",
				"ATTACK_alliedvault_4",
				"ATTACK_alliedvault_5",
				"DEFEND_alliedvault_6",
				"DEFEND_alliedvault_7",
				"DEFEND_alliedvault_9",
			});

				Util.MapDebugPrint(GetEntName(ent) + "^8Has Entered The Side Tunnel With The Gold!");
			}
		},
		OnExit = function(ent)
		{
			if ( GetEntFlags(ent,ENTFLAG.CARRYINGGOAL) )
			{
				SetAvailableMapGoals( TEAM.AXIS, false, "ATTACK_alliedvault_.*" );
				
				Util.MapDebugPrint(GetEntName(ent) + "^3Has Exited The Side Tunnel With The Gold!");
			}
		},
	},
	
	GoldTrigger4 =
	{
		Name = "GoldTrigger4",
		TriggerOnClass = CLASS.ANYPLAYER,
		OnEnter = function(ent)
		{
			if ( GetEntFlags(ent,ENTFLAG.CARRYINGGOAL) )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, {
				"PLANT_Vault_room_door",
				"PLANT_Side_Entrance",
				"ATTACK_gold_.*",
				"SWITCH_garage_3",
			});
				SetAvailableMapGoals( TEAM.ALLIES, false, {
				"ATTACK_alliedvault_.*",
				"SNIPE_alliesA_.*",
				"DEFEND_art_.*",
				"REPAIRMG42_mg42_a",
				"MOUNTMG42_mg42_a",
				"SWITCH_garage_1",
			});
				SetAvailableMapGoals( TEAM.AXIS, true, {
				"PLANTMINE_mineB_.*",
				"DEFEND_gold_.*",
				"DEFEND_axistunnel_.*",
				"BUILD_Side_Entrance",
				"BUILD_Vault_room_door",
				"MOBILEMG42_defendB_.*",
				"MOUNTMG42_mg42_.*",
				"REPAIRMG42_mg42_.*",
				"SNIPE_axisB_.*",
			});
				SetAvailableMapGoals( TEAM.AXIS, false, {
				"PLANTMINE_mineA_.*",
				"DEFEND_alliedvault_.*",
				"ATTACK_tankgate_.*",
				"ATTACK_maingate_.*",
				"ATTACK_alliedvault_.*",
			});

				Util.MapDebugPrint(GetEntName(ent) + "^8Is Inside The VaultRoom With The Gold!");
			}
		},
		OnExit = function(ent)
		{
			if ( GetEntFlags(ent,ENTFLAG.CARRYINGGOAL) )
			{
				SetAvailableMapGoals( TEAM.ALLIES, true, {
				"CAPPOINT_truck",
				"ATTACK_alliedvault_.*",
				"DEFEND_art_.*",
				"SNIPE_alliesA_.*",
				"REPAIRMG42_mg42_a",
				"MOUNTMG42_mg42_a",
				"SWITCH_garage_1",
			});
				SetAvailableMapGoals( TEAM.ALLIES, false, {
				"PLANT_Vault_room_door",
				"PLANT_Side_Entrance",
				"ATTACK_gold_.*",
				"SNIPE_alliesB_.*",
				"SWITCH_garage_3",
			});
				SetAvailableMapGoals( TEAM.AXIS, true, {
				"DEFEND_alliedvault_.*",
				"PLANTMINE_mineA_.*",
			});
				SetAvailableMapGoals( TEAM.AXIS, false, {
				"AIRSTRIKE_defendA",
				"PLANTMINE_mineB_.*",
				"DEFEND_gold_.*",
				"DEFEND_axistunnel_.*",
				"BUILD_Side_Entrance",
				"BUILD_Vault_room_door",
				"MOBILEMG42_defendB_.*",
				"MOUNTMG42_mg42_.*",
				"REPAIRMG42_mg42_.*",
				"SWITCH_tap",
				"SWITCH_garage_3",
				"SNIPE_axisB_.*",
				"DEFEND_flag_.*",
			});
				
				Util.MapDebugPrint(GetEntName(ent) + "^3Has Exited The VaultRoom With The Gold!");
			}
		},
	},

	SneakFlag =
	{
		Name = "SneakFlag",
		TriggerOnClass = CLASS.ANYPLAYER,
		OnEnter = function(ent)
		{
			if( GetEntTeam(ent) == TEAM.ALLIES )
			{
				foreach ( bot in BotTable )
				{
					if ( bot.GetTeam() == TEAM.AXIS )
					{
						bot.SayTeam("Intruder near the flag!");
						break;
					}
				}
			}
		},

	},

	SneakVault =
	{
		Name = "SneakVault",
		TriggerOnClass = CLASS.ENGINEER,
		OnEnter = function(ent)
		{
			if( GetEntTeam(ent) == TEAM.ALLIES )
			{
				foreach ( bot in BotTable )
				{
					if ( bot.GetTeam() == TEAM.AXIS )
					{
						bot.SayTeam("Intruder goes to the Vault!");
						break;
					}
				}
			}
		},

	},

	SneakNearVault =
	{
		Name = "SneakNearVault",
		TriggerOnClass = CLASS.ENGINEER,
		OnEnter = function(ent)
		{
			if( GetEntTeam(ent) == TEAM.ALLIES )
			{
				foreach ( bot in BotTable )
				{
					if ( bot.GetTeam() == TEAM.AXIS )
					{
						bot.SayTeam("Intruder near the Vault!");
						break;
					}
				}
			}
		},

	},
	
	VaultRoom =
	{
		Name = "VaultRoom",
		TriggerOnClass = CLASS.COVERTOPS,
		OnEnter = function(ent)
		{
			if( GetEntTeam(ent) == TEAM.ALLIES || GetEntFlags(ent, ENTFLAG.DISGUISED) )
			{
				SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_gold_.*" );

				Util.MapDebugPrint(GetEntName(ent) + "Allies are near the Vault room!");
			}
		},
		OnExit = function(ent)
		{
			if( GetEntTeam(ent) == TEAM.ALLIES || GetEntFlags(ent, ENTFLAG.DISGUISED) )
			{
				SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_gold_.*" );

				Util.MapDebugPrint(GetEntName(ent) + "Vault room is clear.");
			}
		},
	},
	
	Tank_Near_Barrier_1 =
	{
		Name = "Tank_Near_Barrier_1",
		TriggerOnEntity = GetGoal("MOVER_tank").GetEntity(),
		OnEnter = function(ent)
		{
		
			SetAvailableMapGoals( TEAM.AXIS, false, {
						"BUILD_Command_Post",
						"AIRSTRIKE_defendA",
						"MOBILEMG42_defendA_.*",
						"DEFEND_flag_.*",
						"DEFEND_maingate_.*",
						"DEFEND_tankgate_.*",
						"SWITCH_piano.*",
						"SWITCH_dj.*",
						"SWITCH_smoke",
						"SWITCH_phone_1",
						"CHECKPOINT_forwardbunkerflag",
			});
			SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_firstbarrier_.*" );
			
			Util.MapDebugPrint( "Tank_Near_Barrier_1" );
		},
	},
	
	Tank_At_Barrier_1 =
	{
		Name = "Tank_At_Barrier_1",
		TriggerOnEntity = GetGoal("MOVER_tank").GetEntity(),
		OnEnter = function(ent)
		{
		
			SetAvailableMapGoals( TEAM.ALLIES, false, {
						"ESCORT_tank",
						"BUILD_Tank",
			});
			
			Util.MapDebugPrint( "Tank_At_Barrier_1" );
		},
	},
	
	Tank_At_Barrier_2 =
	{
		Name = "Tank_At_Barrier_2",
		TriggerOnEntity = GetGoal("MOVER_tank").GetEntity(),
		OnEnter = function(ent)
		{
			SetAvailableMapGoals( TEAM.ALLIES, true, "PLANT_second_Tank_Barrier" );
		
			SetAvailableMapGoals( TEAM.ALLIES, false, {
						"ESCORT_tank",
						"BUILD_Tank",
			});
			
			Util.MapDebugPrint( "Tank_At_Barrier_2" );
		},
	},
	
	FireB =
	{
		Name = "FireB",
		TriggerOnClass = CLASS.ANYPLAYER,
		OnEnter = function(ent)
		{
			if( GetEntTeam(ent) == TEAM.ALLIES )
			{
				foreach ( bot in BotTable )
				{
					if ( bot.GetTeam() == TEAM.ALLIES )
					{
						bot.SayTeam("Fire is hot!");
						break;
					}
				}
			}
		},
	},

	FireR =
	{
		Name = "FireR",
		TriggerOnClass = CLASS.ANYPLAYER,
		OnEnter = function(ent)
		{
			if( GetEntTeam(ent) == TEAM.AXIS )
			{
				foreach ( bot in BotTable )
				{
					if ( bot.GetTeam() == TEAM.AXIS )
					{
						bot.SayTeam("Fire is hot!");
						break;
					}
				}
			}
		},
	},
	
};

global OnMapLoad = function()
{
	goldtrigger1 = OnTriggerRegion(AABB(4355.626,-1380.853,-61.606,6617.768,1201.290,873.301), Map.GoldTrigger1);
	goldtrigger2 = OnTriggerRegion(AABB(2806.986,519.969,392.125,4006.759,1904.875,732.029), Map.GoldTrigger2);
	goldtrigger3 = OnTriggerRegion(AABB(3149.872,-3040.875,325.208,3776.875,7.228,816.133), Map.GoldTrigger3);
	goldtrigger4 = OnTriggerRegion(AABB(3889.125,-1340.875,381.125,4190.875,-1098.028,548.264), Map.GoldTrigger4);
	VaultRoom = OnTriggerRegion(AABB(4179.125,-1516.056,345.125,5072.875,-849.125,603.125), Map.VaultRoom);
	Tank_Near_Barrier_1 = OnTriggerRegion(AABB(3555.291,1452.778,398.380,4927.875,1843.275,631.129),Map.Tank_Near_Barrier_1);
	Tank_At_Barrier_1 = OnTriggerRegion(AABB(5427.001,1479.550,505.228,5544.648,1739.665,596.911), Map.Tank_At_Barrier_1);
	Tank_At_Barrier_2 = OnTriggerRegion(AABB(6351.219,758.381,507.125,6559.181,938.077,581.125), Map.Tank_At_Barrier_2);
	DCM1 = OnTriggerRegion(AABB(5064.520,1109.261,806.838,6127.118,1230.937,999.125), RegionTrigger.DisableCombatMovement);
	DCM2 = OnTriggerRegion(AABB(2888.331,-1928.307,613.373,3263.982,-1255.453,837.139), RegionTrigger.DisableCombatMovement);
	DCM3 = OnTriggerRegion(AABB(2047.341,-274.556,1059.495,3013.029,140.456,1358.982), RegionTrigger.DisableCombatMovement);
	DCM4 = OnTriggerRegion(AABB(1065.616,-575.755,371.669,2144.556,-176.203,537.959), RegionTrigger.DisableCombatMovement);
	DBP1 = RegionTrigger.Create(AABB(1919.125,-2353.866,289.125,2094.489,-2239.892,718.923), "DisableBotPush", "Ladder");
	SneakFlag = OnTriggerRegion(AABB(3075.912,-696.148,411.125,3764.054,-132.918,833.029), Map.SneakFlag);
	SneakVault = OnTriggerRegion(AABB(4163.918,2371.387,649.125,4482.300,2468.873,923.553), Map.SneakVault);
	SneakNearVault = OnTriggerRegion(AABB(4590.669,-1783.958,345.125,5920.059,-633.620,512.386), Map.SneakNearVault);
	FireB = OnTriggerRegion(AABB(3137.143,-1074.711,725.359,3149.412,-1056.703,793.306), Map.FireB);
	FireR = OnTriggerRegion(AABB(3137.143,-1074.711,725.359,3149.412,-1056.703,793.306), Map.FireR);
	
	// Register callback functions
	OnTrigger( "^oAllied Command Post constructed. Charge speed increased!", Map.Command_Post_Built );
	OnTrigger( "^oAxis Command Post constructed. Charge speed increased!", Map.Command_Post_Built );
	OnTrigger( "^oThe Side Entrance has been built", Map.Side_Entrance_Built );
	OnTrigger( "^oThe Tank has been repaired", Map.Tank_Built );
	OnTrigger( "^oThe Vault room door has been built", Map.Vault_room_door_Built );
	OnTrigger( "^oThe first Tank Barrier has been constructed.", Map.first_Tank_Barrier_Built );
	OnTrigger( "^oThe second Tank Barrier has been constructed.", Map.second_Tank_Barrier_Built );
	OnTrigger( "Planted at the Command Post.", Map.Command_Post_Planted );
	OnTrigger( "Planted at the Main Gate.", Map.Main_Gate_Planted );
	OnTrigger( "Planted at the Side Entrance.", Map.Side_Entrance_Planted );
	OnTrigger( "Planted at the Tank Gate.", Map.Tank_Gate_Planted );
	OnTrigger( "Planted at the Vault room door.", Map.Vault_room_door_Planted );
	OnTrigger( "Planted at the first Tank Barrier.", Map.first_Tank_Barrier_Planted );
	OnTrigger( "Planted at the second Tank Barrier.", Map.second_Tank_Barrier_Planted );
	OnTrigger( "Defused at the Command Post.", Map.Command_Post_Defused );
	OnTrigger( "Defused at the Main Gate.", Map.Main_Gate_Defused );
	OnTrigger( "Defused at the Side Entrance.", Map.Side_Entrance_Defused );
	OnTrigger( "Defused at the Tank Gate.", Map.Tank_Gate_Defused );
	OnTrigger( "Defused at the Vault room door.", Map.Vault_room_door_Defused );
	OnTrigger( "Defused at the first Tank Barrier.", Map.first_Tank_Barrier_Defused );
	OnTrigger( "Defused at the second Tank Barrier.", Map.second_Tank_Barrier_Defused );
	OnTrigger( "^oAllied team has destroyed the Axis Command Post!", Map.Command_Post_Destroyed );
	OnTrigger( "^oAxis team has destroyed the Allied Command Post!", Map.Command_Post_Destroyed );
	OnTrigger( "^oThe Allies have destroyed the Main Gate!", Map.Main_Gate_Destroyed );
	OnTrigger( "^oAllies have breached the Side Entrance", Map.Side_Entrance_Destroyed );
	OnTrigger( "^oThe Allies have destroyed the Tank Gate!", Map.Tank_Gate_Destroyed );
	OnTrigger( "^oThe Vault room door has been destroyed", Map.Vault_room_door_Destroyed );
	OnTrigger( "^oAllies team has destroyed the first Tank Barrier!", Map.first_Tank_Barrier_Destroyed );
	OnTrigger( "^oAllies team has destroyed the second Tank Barrier!", Map.second_Tank_Barrier_Destroyed );
	OnTrigger( "^oThe Allies have stolen a Gold Crate!", Map.axis_gold1_Taken );
	OnTrigger( "^oThe Axis have intercepted the stolen Gold Crate!", Map.axis_gold1_Returned );
	OnTrigger( "^oAllies have escaped with the Gold!", Map.axis_gold1_Secured );
	OnTrigger( "^oAxis reclaim the Forward Bunker!", Map.forwardbunkerflag_Axis_Captured );
	OnTrigger( "^oAllies capture the Forward Bunker!", Map.forwardbunkerflag_Allies_Captured );
	OnTrigger( "^oAllied team has stolen the Tank!", Map.Tank_stolen );
	OnTrigger( "^oThe Tank is outside the Grotli tunnel", Map.Tank_outside );
	OnTrigger( "^oThe Tank has entered the Axis Base", Map.Tank_inside );
	OnTrigger( "^oAllied team has destroyed the Axis Door!", Map.Tank_end );
	OnTrigger( "thirty second warning.", Map.thirty_second );

	Util.DisableGoal( ".*", true ); // all but routes
	SetAvailableMapGoals( TEAM.ALLIES, true, {
		"PLANT_Main_Gate",
		"ATTACK_maingate_.*",
		"SNIPE_alliesA_.*",
		"SMOKEBOMB_alliesA_1",
		"SMOKEBOMB_alliesA_3",
		"SWITCH_phone_2",
		"DEFEND_art_.*",
		"MOUNTMG42_mg42_a",
		"REPAIRMG42_mg42_a",
		"AMMOCAB_803",
	});
	SetAvailableMapGoals( TEAM.AXIS, true, {
		"SWITCH_dj_.*",
		"SWITCH_piano_.*",
		"SWITCH_smoke",
		"SWITCH_phone_1",
		"SWITCH_phone_2",
		"DEFEND_art_.*",
		"DEFEND_maingate_.*",
		"SNIPE_axisA_.*",
		"PLANTMINE_mineA_.*",
		"BUILD_Command_Post",
		"SWITCH_garage_2",
		"MOBILEMG42_defendA_.*",
		"GRENADE_mg42_01",
		"AMMOCAB_803",
		"HEALTHCAB_803",
		"HEALTHCAB_north_healthcabinet",
		"AMMOCAB_north_ammocabinet",
		"AIRSTRIKE_defendA",
	});

	// Max users per goal
	Util.SetMaxUsers( 1, "ATTACK_.*" );
	Util.SetMaxUsers( 1, "DEFEND_.*" );
	Util.SetMaxUsers( 1, "GRENADE_.*" );
	Util.SetMaxUsers( 1, "MOUNTMG42_.*" );
	Util.SetMaxUsers( 1, "REPAIRMG42_.*" );
	Util.SetMaxUsers( 1, "PLANT_.*" );
	Util.SetMaxUsers( 2, "DEFEND_art_.*" );
	Util.SetMaxUsers( 1, "SWITCH_piano_.*" );
	Util.SetMaxUsers( 1, "SWITCH_phone_.*" );
	Util.SetMaxUsers( 1, "SWITCH_dj_.*" );
	Util.SetMaxUsers( 1, "SWITCH_smoke" );
	Util.SetMaxUsers( 4, "CHECKPOINT_forwardbunkerflag" );

	// Camp times
	SetMapGoalProperties( "MOUNTMG42_.*", {MinCampTime=15, MaxCampTime=40} );
	SetMapGoalProperties( "MOBILEMG42_.*", {MinCampTime=10, MaxCampTime=60} );

	// Allies goals
	SetGoalPriority( "CHECKPOINT_forwardbunkerflag", 0.85, TEAM.ALLIES );
	SetGoalPriority( "DEFEND_hill_.*", 0.5, TEAM.ALLIES, CLASS.COVERTOPS );
	SetGoalPriority( "FLAG_axis_gold1", 0.89, TEAM.ALLIES );
	SetGoalPriority( "PLANT_Command_Post", 0.7, TEAM.ALLIES );
	SetGoalPriority( "PLANT_Main_Gate", 0.82, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "PLANT_first_Tank_Barrier", 0.81, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "PLANT_second_Tank_Barrier", 0.8, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "PLANT_Tank_Gate", 0.8, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "PLANT_Side_Entrance", 0.82, TEAM.ALLIES, CLASS.COVERTOPS );
	SetGoalPriority( "PLANT_Side_Entrance", 0.5, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "PLANT_Vault_room_door", 0.83, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "PLANT_Vault_room_door", 0.1, TEAM.ALLIES, CLASS.COVERTOPS );
	SetGoalPriority( "BUILD_Tank", 0.9, TEAM.ALLIES, CLASS.ENGINEER );
	SetGoalPriority( "MOBILEMORTAR_attackA_1", 0.8, TEAM.ALLIES );
	SetGoalPriority( "ATTACK_tankgate_.*", 0.51, TEAM.ALLIES );

	// Axis goals
	SetGoalPriority( "CHECKPOINT_forwardbunkerflag", 0.95, TEAM.AXIS );
	SetGoalPriority( "PLANT_Command_Post", 0.7, TEAM.AXIS );
	SetGoalPriority( "BUILD_first_Tank_Barrier", 0.94, TEAM.AXIS );
	SetGoalPriority( "BUILD_second_Tank_Barrier", 0.93, TEAM.AXIS );
	SetGoalPriority( "BUILD_Vault_room_door", 0.92, TEAM.AXIS );
	SetGoalPriority( "BUILD_Side_Entrance", 0.9, TEAM.AXIS );
	SetGoalPriority( "DEFEND_firstbarrier_.*", 0.51, TEAM.AXIS );
	SetGoalPriority( "DEFEND_tankgate_.*", 0.51, TEAM.AXIS );
	SetGoalPriority( "DEFEND_flag_.*", 0.51, TEAM.AXIS );	
	SetGoalPriority( "DEFEND_axistunnel_.*", 0.52, TEAM.AXIS );
	SetGoalPriority( "DEFEND_gold_.*", 0.53, TEAM.AXIS );
	SetGoalPriority( "DEFEND_alliedvault_.*", 0.56, TEAM.AXIS );
	SetGoalPriority( "MOBILEMORTAR_defendB_1", 0.8, TEAM.AXIS );

	// All
	SetGoalPriority( "MOUNTMG42_mg42_.*", 0.60 );

	SetGoalPriority( "DEFEND_chair_1", 0.4, TEAM.AXIS );
	SetGoalPriority( "DEFEND_art_.*", 0.4 );
	SetGoalPriority( "SWITCH_tap", 0.4, TEAM.AXIS );
	SetGoalPriority( "SWITCH_garage_1", 0.3 );
	SetGoalPriority( "SWITCH_garage_2", 0.3 );
	SetGoalPriority( "SWITCH_garage_3", 0.3, TEAM.AXIS );

	SetGoalPriority( "SWITCH_smoke", 0);
	SetGoalPriority( "SWITCH_smoke", 0.5, 0, CLASS.SOLDIER );
	SetGoalPriority( "SWITCH_dj_.*", 0);
	SetGoalPriority( "SWITCH_dj_.*", 0.5, 0, CLASS.SOLDIER );
	SetGoalPriority( "SWITCH_piano_.*", 0);
	SetGoalPriority( "SWITCH_piano_.*", 0.5, 0, CLASS.SOLDIER );
	SetGoalPriority( "SWITCH_phone_.*", 0);
	SetGoalPriority( "SWITCH_phone_.*", 0.5, 0, CLASS.SOLDIER );

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

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

global InitializeRoutes = function()
{
	MapRoutes =
	{
		BUILD_first_Tank_Barrier =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisright = {},
				},
		},
		BUILD_second_Tank_Barrier =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisright = {},
				},
		},
		BUILD_Vault_room_door =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisback = {},
				ROUTE_axisdown = { Weight = 2 },
				},
		},
		BUILD_Side_Entrance =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisback = { Weight = 2 },
				ROUTE_axisdown = {},
				},
		},
		PLANT_first_Tank_Barrier =
		{
			ROUTE_flag_spawn =
				{
				ROUTE_axisleft3 =
					{
					ROUTE_axisleft2 = {},
					},
				ROUTE_kar = {},
				},
		},
		PLANT_second_Tank_Barrier =
		{
			ROUTE_flag_spawn =
				{
				ROUTE_axisleft3 =
					{
					ROUTE_axisleft = {},
					},
				ROUTE_kar =
					{
					ROUTE_partB = {},
					},
				},
		},
		PLANT_Main_Gate =
		{
			ROUTE_allies_spawn_1 =
				{
				ROUTE_hallA2 = { Weight = 2 },
				ROUTE_luik = { Weight = 0.5 },
				ROUTE_waterside =
					{
					ROUTE_waterside2 = {},
					},
				},
			ROUTE_allies_spawn_2 =
				{
				ROUTE_partA1 = {},
				ROUTE_waterside =
					{
					ROUTE_waterside2 = {},
					},
				},
			ROUTE_flag_spawn =
				{
				ROUTE_garagedoor = {},
				},
		},
		PLANT_Side_Entrance =
		{
			ROUTE_flag_spawn =
				{
				ROUTE_mainright = 
					{
					Weight = 0.5, 
					ROUTE_partA1 =
						{
						ROUTE_hallA2 =
							{
							ROUTE_sideentrance = {},
							},
						},
					},
				ROUTE_garagedoor =
					{
					Weight = 2,
					ROUTE_hallA2 =
						{
						ROUTE_sideentrance = {},
						},
					},
				},
		},
		PLANT_Vault_room_door =
		{
			ROUTE_flag_spawn =
				{
				ROUTE_tunnelwater = {},
				ROUTE_tunnelgold = {},
				ROUTE_axisup =
					{
					Weight = 2,
					ROUTE_axisdown = {},
					},
				ROUTE_kar =
					{
					ROUTE_axisrightin =
						{
						ROUTE_axisdown = {},
						},
					},
				ROUTE_axisleft3 =
					{
					ROUTE_axisleft =
						{
						ROUTE_axisbasemain = {},
						},
					},
				},
		},
		FLAG_axis_gold1 =
		{
			ROUTE_flag_spawn =
				{
				ROUTE_axisbasemain = { Weight = 0.5 },
				ROUTE_axisleft =
					{
					ROUTE_tunnelgold =
						{
						ROUTE_gold = {},
						},
					},
				ROUTE_tunnelwater =
					{
					ROUTE_gold = {},
					},
				ROUTE_kar =
					{
					ROUTE_axisrightin =
						{
						ROUTE_axisdown =
							{
							ROUTE_gold = {},
							},
						},
					},
				ROUTE_axisleft =
					{
					ROUTE_gold = {},
					},
				},
		},
		CHECKPOINT_forwardbunkerflag =
		{
			ROUTE_allies_spawn_1 =
				{
				ROUTE_partA1 =
					{
					ROUTE_mainleft = {},
					ROUTE_mainright =
						{
						ROUTE_wctunnel =
							{
							ROUTE_wc = {},
							},
						},
					},
				},
			ROUTE_allies_spawn_2 =
				{
				ROUTE_partA1 =
					{
					ROUTE_mainleft = {},
					ROUTE_mainright = {},
					},
				ROUTE_waterside =
					{
					ROUTE_waterside2 =
						{
						ROUTE_mainleft = { Weight = 2 },
						ROUTE_mainright =
							{
							ROUTE_wctunnel =
								{
								ROUTE_wc = {},
								},
							},
						},
					},
				},
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisup =
					{
					ROUTE_axisleft =
						{
						ROUTE_axisleft2 = {},
						},
					},
				ROUTE_axisback =
					{
					ROUTE_sideentrance =
						{
						ROUTE_axisside =
							{
							ROUTE_hallA2 =
								{
								ROUTE_partA1 =
									{
									ROUTE_mainleft = { Weight = 2 },
									ROUTE_mainright =
										{
										ROUTE_wctunnel =
											{
											ROUTE_wc = {},
											},
										},
									},
								},
							},
						},
					},
				},
		},
		ATTACK_flag_1 =
		{
			ROUTE_allies_spawn_1 =
				{
				ROUTE_partA1 =
					{
					ROUTE_mainright =
						{
						ROUTE_wctunnel =
							{
							ROUTE_wc = {},
							},
						},
					},
				},
			ROUTE_allies_spawn_2 =
				{
				ROUTE_partA1 =
					{
					ROUTE_mainleft = {},
					ROUTE_mainright = {},
					},					
				ROUTE_waterside =
					{
					ROUTE_waterside2 =
						{
						ROUTE_mainleft = { Weight = 2 },
						ROUTE_mainright = {},
						},
					},
				},
		},
		DEFEND_flag_1 =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisup =
					{
					ROUTE_axisleft =
						{
						ROUTE_axisleft2 = {},
						},
					},
				ROUTE_axisback =
					{
					ROUTE_sideentrance =
						{
						ROUTE_axisside =
							{
							ROUTE_hallA2 =
								{
								ROUTE_partA1 =
									{
									ROUTE_mainleft = { Weight = 2 },
									ROUTE_mainright =
										{
										ROUTE_wctunnel =
											{
											ROUTE_wc = {},
											},
										},
									},
								},
							},
						},
					},
				},
		},
		DEFEND_tankgate_1 =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisup =
					{
					ROUTE_axisleft =
						{
						ROUTE_axisleft2 = {},
						},
					},
				ROUTE_sideentrance =
					{
					ROUTE_axisside =
						{
						ROUTE_hallA2 =
							{
							ROUTE_partA1 =
								{
								ROUTE_mainleft = {},
								ROUTE_mainright = {},
								},
							},
						},
					},
				},
		},
		ATTACK_maingate_1 =
		{
			ROUTE_allies_spawn_1 =
				{
				ROUTE_hallA2 = { Weight = 2 },
				ROUTE_luik = { Weight = 0.5 },
				},
			ROUTE_allies_spawn_2 =
				{
				ROUTE_partA1 = {},
				ROUTE_waterside =
					{
					ROUTE_waterside2 = {},
					},
				},
			ROUTE_flag_spawn =
				{
				ROUTE_garagedoor = {},
				},
		},
		ATTACK_tankgate_1 =
		{
			ROUTE_allies_spawn_1 =
				{
				ROUTE_hallA1 =
					{
					ROUTE_hallA2 =
						{
						ROUTE_partA1 =
							{
							ROUTE_mainleft = {},
							ROUTE_mainright = { Weight = 2 },
							},
						},
					},
				ROUTE_luik =
					{
					ROUTE_partA1 =
						{
						ROUTE_mainleft = { Weight = 2 },
						ROUTE_mainright = {},
						},
					},
				ROUTE_waterside =
					{
					ROUTE_waterside2 =
						{
						ROUTE_mainleft = { Weight = 2 },
						ROUTE_mainright = {},
						},
					},
				},
			ROUTE_allies_spawn_2 =
				{
				ROUTE_partA1 =
					{
					ROUTE_mainleft = {},
					ROUTE_mainright = {},
					},
				ROUTE_waterside =
					{
					ROUTE_waterside2 =
						{
						ROUTE_mainleft = { Weight = 2 },
						ROUTE_mainright = {},
						},
					},
				},
		},
		ATTACK_gold_1 =
		{
			ROUTE_flag_spawn =
				{
				ROUTE_tunnelwater = {},
				ROUTE_tunnelgold = {},
				ROUTE_axisbasemain = { Weight = 0.5 },
				ROUTE_kar =
					{
					ROUTE_partB =
						{
						ROUTE_axisbasemain = { Weight = 0.5 },
						ROUTE_axisrightin = 
							{
							ROUTE_axisdown = {},
							},
						},
					},
				ROUTE_axisleft3 =
					{
					Weight = 2,
					ROUTE_axisleft = {},
					ROUTE_axisup = {},
					},
				},
			ROUTE_hallA2 =
				{
				ROUTE_sideentrance = {},
				},
		},
		ATTACK_alliedvault_1 =
		{
			ROUTE_axisbasemain =
				{
				ROUTE_kar =
					{
					ROUTE_mainright = {},
					ROUTE_mainleft =
						{
						ROUTE_waterside2 =
							{
							ROUTE_waterside = {},
							},
						},
					ROUTE_garagedoor =
						{
						ROUTE_hallA1 = {},
						},
					},
				ROUTE_axisleft =
					{
					ROUTE_axisleft2 =
						{
						ROUTE_mainleft = {},
						},
					},
				},
			ROUTE_kar =
				{
				ROUTE_garagedoor =
					{
					ROUTE_hallA1 = {},
					},
				},
			ROUTE_flag_spawn =
				{
				ROUTE_mainright = {},
				ROUTE_mainleft =
					{
					ROUTE_waterside2 =
						{
						ROUTE_waterside = {},
						},
					},
				ROUTE_garagedoor =
					{
					ROUTE_hallA1 = {},
					},
				},
		},
		DEFEND_alliedvault_1 =
		{
			ROUTE_axis_spawn_2 =
				{
				Weight = 2,
				ROUTE_axisback =
					{
					ROUTE_sideentrance =
						{
						ROUTE_axisside =
							{
							ROUTE_hallA2 =
								{
								ROUTE_hallA1 = {},
								},
							},
						},
					},
				ROUTE_axisside =
					{
					ROUTE_hallA2 = {},
					},
				ROUTE_axisright =
					{
					Weight = 0.5,
					ROUTE_kar =
						{
						ROUTE_mainright = {},
						},
					},
				},
		},
		ATTACK_firstbarrier_2 =
		{
			ROUTE_flag_spawn =
				{
				ROUTE_kar = { Weight = 2 },
				ROUTE_axisleft3 =
					{
					Weight = 3,
					ROUTE_axisleft2 = {},
					},
				},
		},
		ATTACK_secondbarrier_1 =
		{
			ROUTE_flag_spawn =
				{
				ROUTE_kar =
					{
					ROUTE_partB = {},
					},
				ROUTE_axisleft3 =
					{
					Weight = 2,
					ROUTE_axisleft = {},
					},
				},
		},
		DEFEND_firstbarrier_1 =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisright = {},
				ROUTE_axisleft =
					{
					ROUTE_axisleft2 = {},
					},
				},
		},
		DEFEND_secondbarrier_1 =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisright = {},
				ROUTE_axisleft = {},
				},
		},
		DEFEND_gold_1 =
		{
			ROUTE_axis_spawn_2 =
				{
				ROUTE_axisback = { Weight = 0.5 },
				ROUTE_axisdown = { Weight = 2 },
				},
		},
		CAPPOINT_truck =
		{
			ROUTE_gold =
				{
				ROUTE_axisbasemain =
					{
					ROUTE_axisleft =
						{
						ROUTE_axisleft2 =
							{
							ROUTE_mainleft = {},
							},
						},
					},
				ROUTE_axisright =
					{
					ROUTE_kar =
						{
						ROUTE_mainleft =
							{
							ROUTE_waterside2 =
								{
								ROUTE_waterside = {},
								},
							ROUTE_partA1 = {},
							},
						ROUTE_garagedoor =
							{
							ROUTE_hallA1 = {},
							},
						},
					},
				ROUTE_tunnelwater =
					{
					ROUTE_kar =
						{
						ROUTE_mainleft = {},
						ROUTE_garagedoor =
							{
							ROUTE_hallA1 = {},
							},
						},
					},
				},
		},
	};

	// Copy routes
	MapRoutes["ATTACK_alliedvault_.*"] = MapRoutes.ATTACK_alliedvault_1;
	MapRoutes["ATTACK_flag_.*"] = MapRoutes.ATTACK_flag_1;
	MapRoutes["ATTACK_maingate_.*"] = MapRoutes.ATTACK_maingate_1;
	MapRoutes["ATTACK_tankgate_.*"] = MapRoutes.ATTACK_tankgate_1;
	MapRoutes["ATTACK_firstbarrier_.*"] = MapRoutes.ATTACK_firstbarrier_2;
	MapRoutes["ATTACK_secondbarrier_.*"] = MapRoutes.ATTACK_secondbarrier_1;
	MapRoutes["ATTACK_gold_.*"] = MapRoutes.ATTACK_gold_1;
	MapRoutes["DEFEND_alliedvault_.*"] = MapRoutes.DEFEND_alliedvault_1;
	MapRoutes["DEFEND_tankgate_.*"] = MapRoutes.DEFEND_tankgate_1;
	MapRoutes["DEFEND_firstbarrier_.*"] = MapRoutes.DEFEND_firstbarrier_1;
	MapRoutes["DEFEND_secondbarrier_.*"] = MapRoutes.DEFEND_secondbarrier_1;
	MapRoutes["DEFEND_flag_.*"] = MapRoutes.DEFEND_flag_1;
	MapRoutes["DEFEND_gold_.*"] = MapRoutes.DEFEND_gold_1;
	Util.Routes(MapRoutes);
};
