//==========================================================================================
//
//	kerkyra.gm
//
//	Who                    	When		What
//------------------------------------------------------------------------------------------
//	^1{WeB}^7*^4GA^1NG$^4TA^7*	06 June 2016	Initial Script
//
//==========================================================================================
//

global Map =
{
	ShowMovers = false,
	Debug = 0,
	Movers = 
	{
	"MOVER_piano",
	},

	Tank_Barrier_1_Dyno = 0,
	Tank_Barrier_2_Dyno = 0,
	Tunnel_Door_Dyno = 0,
	Arficats_secured = 0,
	
	barrierone = 1,
	barriertwo = 1,
	
	DispenseHealthTime = 1.0,
	DispenseAmmoTime = 1.0,
	DefendingTeam = TEAM.ALLIES,
	

	SdKfz_234_Built = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Util.MapDebugPrint( "SdKfz_234_Built" );
	},
	
	SdKfz_234_Damaged = function( trigger )
	{
		if ( TestMap )
			{ return; }
		
		//We want less escorters at start...
		
		if ( Map.barrierone > 0 ) 
		{
			Util.SetMaxUsersInUse( 2, "ESCORT_tank" );
			Util.SetMaxUsersInProgress( 3, "ESCORT_tank" );
		}

		Util.MapDebugPrint( "SdKfz_234_Damaged" );
	},

	Tank_Barrier_1_Built = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		Map.barrierone = 1;		
		
		Util.MapDebugPrint( "Tank_Barrier_1_Built" );
	},

	Tank_Barrier_2_Built = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Map.barriertwo = 1;		
			
		Util.MapDebugPrint( "Tank_Barrier_2_Built" );
	},

	Tunnel_Door_Built = function( trigger )
	{
		if ( TestMap )
			{ return; }

		SetAvailableMapGoals( TEAM.AXIS, false, "ROUTE_tunnel_door" );
			
		Util.MapDebugPrint( "Tunnel_Door_Built" );
	},

	Tank_Barrier_1_Planted = function( trigger )
	{
		if ( TestMap )
			{ return; }

		SetAvailableMapGoals( TEAM.AXIS, true, "ESCORT_tank" );
			
		SetGoalPriority( "BUILD_SdKfz_234", 1.01, TEAM.AXIS );
		SetGoalPriority( "PLANT_Tank_Barrier_1", 0.82, TEAM.AXIS );	
			
		Map.Tank_Barrier_1_Dyno += 1;
		Util.MapDebugPrint( "Tank_Barrier_1_Planted" );
	},

	Tank_Barrier_2_Planted = function( trigger )
	{
		if ( TestMap )
			{ return; }

		SetAvailableMapGoals( TEAM.AXIS, true, "ESCORT_tank" );
			
		SetGoalPriority( "BUILD_SdKfz_234", 1.01, TEAM.AXIS );
		SetGoalPriority( "PLANT_Tank_Barrier_2", 0.82, TEAM.AXIS );	
			
		Map.Tank_Barrier_2_Dyno += 1;
		Util.MapDebugPrint( "Tank_Barrier_2_Planted" );
	},

	Tunnel_Door_Planted = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Map.Tunnel_Door_Dyno += 1;
		Util.MapDebugPrint( "Tunnel_Door_Planted" );
	},

	Tank_Barrier_1_Defused = function( trigger )
	{
		if ( TestMap )
			{ return; }
			

		
		Map.Tank_Barrier_1_Dyno -= 1;
		
		if ( Map.Tank_Barrier_1_Dyno < 1 ) 
		{
			SetGoalPriority( "BUILD_SdKfz_234", 0.90, TEAM.AXIS );
			SetGoalPriority( "PLANT_Tank_Barrier_1", 1.01, TEAM.AXIS );	
		}
		Util.MapDebugPrint( "Tank_Barrier_1_Defused" );
	},

	Tank_Barrier_2_Defused = function( trigger )
	{
		if ( TestMap )
			{ return; }


			
		Map.Tank_Barrier_2_Dyno -= 1;
		
		if ( Map.Tank_Barrier_2_Dyno < 1 ) 
		{
			SetGoalPriority( "BUILD_SdKfz_234", 0.90, TEAM.AXIS );
			SetGoalPriority( "PLANT_Tank_Barrier_2", 1.01, TEAM.AXIS );	
		}
		
		Util.MapDebugPrint( "Tank_Barrier_2_Defused" );
	},

	Tunnel_Door_Defused = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Map.Tunnel_Door_Dyno -= 1;
		Util.MapDebugPrint( "Tunnel_Door_Defused" );
	},

	Tank_Barrier_1_Destroyed = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Map.barrierone = 0;	
			
		Map.Tank_Barrier_1_Dyno = 0;

		Util.MapDebugPrint( "Tank_Barrier_1_Destroyed" );
	},

	Tank_Barrier_2_Destroyed = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		Map.barriertwo = 0;		
			
		Map.Tank_Barrier_2_Dyno = 0;

		Util.MapDebugPrint( "Tank_Barrier_2_Destroyed" );
	},

	Tunnel_Door_Destroyed = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Map.Tunnel_Door_Dyno = 0;
		SetAvailableMapGoals( TEAM.AXIS, true, "ROUTE_tunnel_door" );
		
		Util.MapDebugPrint( "Tunnel_Door_Destroyed" );
	},

	chalice_Taken = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Util.MapDebugPrint( "chalice_Taken" );
	},

	crown_Taken = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Util.MapDebugPrint( "crown_Taken" );
	},

	sword_Taken = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Util.MapDebugPrint( "sword_Taken" );
	},

	chalice_Returned = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Util.MapDebugPrint( "chalice_Returned" );
	},

	crown_Returned = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Util.MapDebugPrint( "crown_Returned" );
	},

	sword_Returned = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Util.MapDebugPrint( "sword_Returned" );
	},

	chalice_Secured = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_chalice" );	
		SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Chalice_1" );

		Util.MapDebugPrint( "chalice_Secured" );
	},

	crown_Secured = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_crown" );	
				

		Util.MapDebugPrint( "crown_Secured" );
	},

	sword_Secured = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_sword" );	

		Util.MapDebugPrint( "sword_Secured" );
	},
	
	Axis_Capture_City = function( trigger )
	{
		if ( TestMap )
			{ return; }	
		SetAvailableMapGoals( TEAM.AXIS, false, "ATTACK_Tank_Barrier_1" );
		SetAvailableMapGoals( TEAM.AXIS, false, "ATTACK_Tank_Barrier_2" );
		SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_9" );
	      SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_8" );
	      SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_7" );	
		SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_6" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_5" );
      	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_4" );
      	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_3" );
      	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2" );
      	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_1" );
      	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_hide" );
		SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_2_8" );
	      SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_2_7" );
	      SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_2_6" );
		SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Tank_Barrier_2" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_2_5" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_2_4" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_2_3" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_2_2" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_2_1" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_city.*" );
		//SetAvailableMapGoals( TEAM.ALLIES, false, "GRENADE_barrier1" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_barrier1" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "CALLARTILLERY_barrier2" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "PLANTMINE_barrier2.*" );
		SetAvailableMapGoals( TEAM.AXIS, true, "SMOKEBOMB_barrier2.*" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "SNIPE_balcony" );
		SetAvailableMapGoals( TEAM.AXIS, true, "AIRSTRIKE_barrier2" );
		SetAvailableMapGoals( TEAM.AXIS, false, "MOBILEMG42_barrier1" );
	
		Util.MapDebugPrint( "Axis_Capture_City" );
	},
	
	Palace_Gates_Breached = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_5" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_4" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_3" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_2" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_1" );	
		SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_2_8" );
	      SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_2_7" );
      	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_2_6" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Chalice_1" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_main_hall" );
	      SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Objective_1" );
	      SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Objective_2" );
      	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Objective_3" );
      	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Objective_4" );
	      SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Objective_5" );
		SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Route_1" );
	      SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Route_2" );
	      SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Route_3" );
		Util.SetMaxUsersInUse( 1, "ESCORT_tank" );
		Util.SetMaxUsersInProgress( 2, "ESCORT_tank" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "PLANTMINE_gate.*" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "PLANTMINE_wall.*" );


		Util.MapDebugPrint( "Palace_Gates_Breached" );
	},
	
	Side_Wall_Breached = function( trigger )
	{
		if ( TestMap )
			{ return; }
		SetAvailableMapGoals( TEAM.ALLIES, true, "CALLARTILLERY_gate" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "CALLARTILLERY_tunnel" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "CALLARTILLERY_wall" );
		
		Util.MapDebugPrint( "Side_Wall_Breached" );
	},
	
	Tank_In_Position = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Tunnel_Door" );
		SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_Axis_Command_Post" );
		SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_chalice" );
	      SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_crown" );
	      SetAvailableMapGoals( TEAM.AXIS, true, "FLAG_sword" );
		SetAvailableMapGoals( TEAM.AXIS, true, "CAPPOINT_tank" );
		SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_SdKfz_234" );
		SetAvailableMapGoals( TEAM.AXIS, false, "ESCORT_tank" );
		SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Route_1" );
	    SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Route_2" );
	    SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Route_3" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "MOBILEMG42_palace" );

		Util.MapDebugPrint( "Tank_In_Position" );
	},
	
	All_Artifacts_Secured = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		Map.Arficats_secured = 1;	
		SetAvailableMapGoals( TEAM.AXIS, true, "ESCORT_tank" );
		SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_SdKfz_234" );
		SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_tank" );
		SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Tunnel_Door" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_1" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_2" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_3" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_4" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_5" );
	      SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_main_hall" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "BUILD_Tunnel_Door" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Stop_Tank_1" );
	      SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Stop_Tank_2" );
	      SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Stop_Tank_3" );
	      SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Stop_Tank_4" );
	      SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Stop_Tank_5" );
	      SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Stop_Tank_6" );
		  Util.SetMaxUsersInUse( 2, "ESCORT_tank" );
		Util.SetMaxUsersInProgress( 5, "ESCORT_tank" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_gate.*" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_wall.*" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_gate" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_tunnel" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_wall" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "REPAIRMG42_balcony_mg" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "SNIPE_balcony" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "PLANTMINE_barrier2.*" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "MOBILEMG42_palace" );
		  
		Util.MapDebugPrint( "All_Artifacts_Secured" );
	},
	
		Axis_Command_Post_Constructed = function( trigger )
	{
		if ( TestMap )
			{ return; }

		Util.MapDebugPrint( "Axis_Command_Post_Constructed" );
	},
	
		Axis_Team_Retreating = function( trigger )
	{
		if ( TestMap )
			{ return; }
			
		//selfkill for change spawnpoint	
		ETUtil.SuicideSpawn( TEAM.ALLIES, 0 );		
		SetAvailableMapGoals( TEAM.ALLIES, true, "CALLARTILLERY_barrier2" );
		SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_2_8" );
		SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_2_7" );
		SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_2_6" );
		
		Util.MapDebugPrint( "Axis_Team_Retreating" );
	},
	
	Tank_Past_First_Barrier = function( trigger )
	{
		if ( TestMap )
			{ return; }	
			
		SetGoalPriority( "ESCORT_tank", 0.80, TEAM.AXIS );			
		SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_SdKfz_234" );
		SetGoalPriority( "BUILD_SdKfz_234", 0.90, TEAM.AXIS );
		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_barrier1.*" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "PLANTMINE_city.*" );
		SetAvailableMapGoals( TEAM.AXIS, false, "SMOKEBOMB_barrier1" );
		SetAvailableMapGoals( TEAM.AXIS, false, "AIRSTRIKE_barrier1" );
		
		Util.MapDebugPrint( "Tank_Past_First_Barrier" );
	},
	
	Tank_Past_Second_Barrier = function( trigger )
	{
		if ( TestMap )
			{ return; }	
			
		SetGoalPriority( "ESCORT_tank", 0.80, TEAM.AXIS );			
		SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_SdKfz_234" );
		SetGoalPriority( "BUILD_SdKfz_234", 0.90, TEAM.AXIS );
		SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_barrier2" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_barrier2.*" );
		SetAvailableMapGoals( TEAM.AXIS, false, "SMOKEBOMB_barrier2.*" );
		SetAvailableMapGoals( TEAM.ALLIES, false, "SNIPE_balcony" );
		SetAvailableMapGoals( TEAM.AXIS, false, "AIRSTRIKE_barrier2" );			
		//Don't give mg earlier, bots seem not to be able to shoot far enough
		SetAvailableMapGoals( TEAM.ALLIES, true, "REPAIRMG42_balcony_mg" );
		SetAvailableMapGoals( TEAM.ALLIES, true, "MOUNTMG42_balcony_mg" );	
		
		Util.MapDebugPrint( "Tank_Past_Second_Barriler" );
	},
	
	tank_at_barrier1 = function( trigger )
	{
		if ( TestMap )
			{ return; }

			SetGoalPriority( "ESCORT_tank", 0.77, TEAM.AXIS );
			
			SetGoalPriority( "BUILD_SdKfz_234", 0.90, TEAM.AXIS );
			SetGoalPriority( "PLANT_Tank_Barrier_1", 1.01, TEAM.AXIS );	
			

				
		if ( Map.barrierone > 0 )
			{ 
			//SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_SdKfz_234" ); 
			SetAvailableMapGoals( TEAM.AXIS, false, "ESCORT_tank" );
			}
		else
			{ 
			//SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_SdKfz_234" );
			SetAvailableMapGoals( TEAM.AXIS, true, "ESCORT_tank" );
			}
		
		Util.MapDebugPrint( "tank_at_barrier1" );
	},
	
	tank_at_barrier2 = function( trigger )
	{
		if ( TestMap )
			{ return; }

			//SetAvailableMapGoals( TEAM.ALLIES, true, "GRENADE_barrier2" );
			SetGoalPriority( "ESCORT_tank", 0.77, TEAM.AXIS );
			SetGoalPriority( "BUILD_SdKfz_234", 0.90, TEAM.AXIS );
			SetGoalPriority( "PLANT_Tank_Barrier_2", 1.01, TEAM.AXIS );
					
		if ( Map.barriertwo > 0 )
			{ 
			//SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_SdKfz_234" ); 
			SetAvailableMapGoals( TEAM.AXIS, false, "ESCORT_tank" );
			
			//SetGoalPriority( "BUILD_SdKfz_234", 1.01, TEAM.AXIS );
			//SetGoalPriority( "PLANT_Tank_Barrier_2", 0.82, TEAM.AXIS );	
			

			}
		else
			{ 
			//SetAvailableMapGoals( TEAM.AXIS, true, "BUILD_SdKfz_234" );
			SetAvailableMapGoals( TEAM.AXIS, true, "ESCORT_tank" );
			}	
					
		
		if ( Map.Arficats_secured > 0 )
			{
				SetAvailableMapGoals( TEAM.ALLIES, false, "REPAIRMG42_balcony_mg" );
				SetAvailableMapGoals( TEAM.ALLIES, false, "MOUNTMG42_balcony_mg" );
			}
			
		Util.MapDebugPrint( "tank_at_barrier2" );
	},
	
	tank_is_escaping = function( trigger )
	{
		if ( TestMap )
			{ return; }

				SetAvailableMapGoals( TEAM.ALLIES, false, "REPAIRMG42_balcony_mg" );
				SetAvailableMapGoals( TEAM.ALLIES, false, "MOUNTMG42_balcony_mg" );

		Util.MapDebugPrint( "tank_is_escaping" );
	},
	
	vehicle_at_location = function( trigger )
	{
		switch(Map.VehicleLocation)
		{
			case 1:
			{
				Map.tank_at_barrier1();
			}
			case 2:
			{
				Map.tank_at_barrier2();
			}
			case 3:
			{
				Map.tank_is_escaping();
			}
		}
		Util.MapDebugPrint("vehicle at location " + Map.VehicleLocation, true);
	},

};

global OnMapLoad = function()
{
	if ( TestMapOn )
		{ Util.AutoTestMap(); }

	
	// Register callback functions
	OnTrigger( "The SdKfz 234 has been repaired!", Map.SdKfz_234_Built );
	OnTrigger( "The SdKfz 234 has been damaged!", Map.SdKfz_234_Damaged );
	OnTrigger( "Tank Barrier #1 has been constructed.", Map.Tank_Barrier_1_Built );
	OnTrigger( "Tank Barrier #2 has been constructed.", Map.Tank_Barrier_2_Built );
	OnTrigger( "The Tunnel Door has been constructed.", Map.Tunnel_Door_Built );
	OnTrigger( "Planted at Tank Barrier #1.", Map.Tank_Barrier_1_Planted );
	OnTrigger( "Planted at Tank Barrier #2.", Map.Tank_Barrier_2_Planted );
	OnTrigger( "Planted at Tunnel Door.", Map.Tunnel_Door_Planted );
	OnTrigger( "Tank Barrier #1 has been destroyed.", Map.Tank_Barrier_1_Destroyed );
	OnTrigger( "Tank Barrier #2 has been destroyed.", Map.Tank_Barrier_2_Destroyed );
	OnTrigger( "The Tunnel Door has been destroyed.", Map.Tunnel_Door_Destroyed );
	OnTrigger( "Axis have stolen The Emperor's Chalice!", Map.chalice_Taken );
	OnTrigger( "Axis have stolen The King's Crown!", Map.crown_Taken );
	OnTrigger( "Axis have stolen The Achilles' Sword!", Map.sword_Taken );
	OnTrigger( "Allies have returned The Emperor's Chalice!", Map.chalice_Returned );
	OnTrigger( "Allies have returned The King's Crown!", Map.crown_Returned );
	OnTrigger( "Allies have returned The Achilles' Sword!", Map.sword_Returned );
	OnTrigger( "Axis have secured The Emperor's chalice!", Map.chalice_Secured );
	OnTrigger( "Axis have secured The King's Crown!", Map.crown_Secured );
	OnTrigger( "Axis have secured The Achilles' sword!", Map.sword_Secured );
	OnTrigger( "Axis team has passed the First Barrier!", Map.Tank_Past_First_Barrier );
	OnTrigger( "Axis team has passed the Second Barrier!", Map.Tank_Past_Second_Barrier );
	OnTrigger( "Axis team has taken over The City!", Map.Axis_Capture_City );
	OnTrigger( "Axis have breached the Palace Gates!", Map.Palace_Gates_Breached );
	OnTrigger( "Axis have breached a hole in the wall!", Map.Side_Wall_Breached );
	OnTrigger( "The SdKfz 234 is in position to take the artifacts!", Map.Tank_In_Position );
	OnTrigger( "Axis team has stolen all the artifacts!", Map.All_Artifacts_Secured );
	OnTrigger( "Axis Command Post constructed. Charge speed increased!", Map.Axis_Command_Post_Constructed );
	OnTrigger( "Axis team is retreating! Command post is compromised!", Map.Axis_Team_Retreating );
	OnTrigger( "tank at location", Map.vehicle_at_location );
		
	SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Tank_Barrier_2" );
	SetAvailableMapGoals( TEAM.AXIS, false, "PLANT_Tunnel_Door" );
	SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_chalice" );
	SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_crown" );
	SetAvailableMapGoals( TEAM.AXIS, false, "FLAG_sword" );
	SetAvailableMapGoals( TEAM.AXIS, false, "CAPPOINT_tank" );
	SetAvailableMapGoals( TEAM.AXIS, false, "BUILD_Axis_Command_Post" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_2_8" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_2_7" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Barrier_2_6" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Route_1" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Route_2" );
	SetAvailableMapGoals( TEAM.AXIS, false, "DEFEND_Tank_Route_3" );
	SetAvailableMapGoals( TEAM.AXIS, true, "PLANT_Tank_Barrier_1" );
	SetAvailableMapGoals( TEAM.AXIS, true, "ESCORT_tank" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_9" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_8" );
	SetAvailableMapGoals( TEAM.AXIS, true, "DEFEND_Tank_Barrier_7" );
	SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_Tank_Barrier_1" );
	SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_Tank_Barrier_2" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_6" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_5" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_4" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_3" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_2" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_1" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "DEFEND_Tank_Barrier_hide" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_5" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_4" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_3" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Tank_Barrier_2_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Chalice_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_main_hall" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_3" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_4" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Objective_5" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Stop_Tank_1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Stop_Tank_2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Stop_Tank_3" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Stop_Tank_4" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Stop_Tank_5" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "DEFEND_Stop_Tank_6" );
	
	SetAvailableMapGoals( TEAM.ALLIES, false, "REPAIRMG42_balcony_mg" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "MOUNTMG42_balcony_mg" );
	SetAvailableMapGoals( TEAM.AXIS, false, "REPAIRMG42_balcony_mg" );
	SetAvailableMapGoals( TEAM.AXIS, false, "MOUNTMG42_balcony_mg" );
	
	//SetAvailableMapGoals( TEAM.ALLIES, true, "GRENADE_barrier1" );	
	//SetAvailableMapGoals( TEAM.ALLIES, false, "GRENADE_barrier2" );	
	SetAvailableMapGoals( TEAM.ALLIES, true, "PLANTMINE_barrier1.*" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_barrier2.*" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_city.*" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_gate.*" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "PLANTMINE_wall.*" );
	SetAvailableMapGoals( TEAM.AXIS, true, "MOBILEMG42_barrier1" );
	SetAvailableMapGoals( TEAM.AXIS, true, "SMOKEBOMB_barrier1" );
	SetAvailableMapGoals( TEAM.AXIS, false, "SMOKEBOMB_barrier2" );
	SetAvailableMapGoals( TEAM.AXIS, true, "AIRSTRIKE_barrier1" );
	SetAvailableMapGoals( TEAM.AXIS, false, "AIRSTRIKE_barrier2" );
	SetAvailableMapGoals( TEAM.ALLIES, true, "CALLARTILLERY_barrier1" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_barrier2" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_gate" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_tunnel" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "CALLARTILLERY_wall" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "SNIPE_balcony" );
	SetAvailableMapGoals( TEAM.ALLIES, false, "MOBILEMG42_palace" );
	SetAvailableMapGoals( TEAM.AXIS, false, "ROUTE_tunnel_door" );
	
	
	RegionTrigger.Create(AABB(-2132.811,123.395,1.125,-1745.521,290.216,75.125), "VehicleTrigger", "barrier1");
	RegionTrigger.Create(AABB(2526.755,815.501,-49.680,2897.705,985.508,44.173), "VehicleTrigger", "barrier2");
	//~Util.DisableGoal( ".*", true ); // all but routes
	//~SetAvailableMapGoals( TEAM.AXIS, true, "ATTACK_.*" );
	//~SetAvailableMapGoals( TEAM.ALLIES, true, "ATTACK_.*" );

	// Max users per goalll
	
	Util.SetMaxUsersInUse( 1, "MOUNTMG42_.*" );
	Util.SetMaxUsersInProgress( 1, "MOUNTMG42_.*" );
	Util.SetMaxUsers( 1, "REPAIRMG42_.*" );
	Util.SetMaxUsers( 1, "CALLARTILLERY.*" );
	Util.SetMaxUsers( 1, "AIRSTRIKE.*" );
	Util.SetMaxUsers( 1, "SMOKEBOMB_.*" );
	Util.SetMaxUsers( 1, "GRENADE_.*" );
	Util.SetMaxUsers( 1, "PLANTMINE_.*" );
	Util.SetMaxUsers( 1, "MOBILEMG42_.*" );
	Util.SetMaxUsers( 1, "SNIPE_.*" );
	Util.SetMaxUsersInProgress( 1, "DEFEND_Tank_Barrier_1" );
	Util.SetMaxUsersInProgress( 1, "DEFEND_Tank_Barrier_2" );
	Util.SetMaxUsersInProgress( 1, "DEFEND_Tank_Barrier_hide" );
	
	Util.SetMaxUsersInUse( 1, "DEFEND_main_hall" );
	Util.SetMaxUsersInProgress( 2, "DEFEND_main_hall" );
	
	Util.SetMaxUsersInUse( 1, "PLANT_Tunnel_Door" );
	Util.SetMaxUsersInProgress( 1, "PLANT_Tunnel_Door" );
	Util.SetMaxUsersInUse( 1, "BUILD_Tunnel_Door" );
	Util.SetMaxUsersInProgress( 1, "BUILD_Tunnel_Door" );
	
	Util.SetGoalRange( "BUILD_Tunnel_Door", 3000);
	Util.SetGoalRange( "PLANT_Tunnel_Door", 3000);
	Util.SetGoalRange( ".*CAB_.*", 3000);
	
	Util.SetMaxUsersInUse( 1, "DEFEND_*" );
	Util.SetMaxUsersInUse( 1, "ATTACK_*" );

	Util.SetMaxUsersInUse( 1, "ESCORT_tank" );
	Util.SetMaxUsersInProgress( 2, "ESCORT_tank" );
	
	// Camp times
	SetMapGoalProperties( "MOUNTMG42_.*", {MinCampTime=60, MaxCampTime=150} );
	SetMapGoalProperties( "SNIPE_.*", {MinCampTime=60, MaxCampTime=150} );
	SetMapGoalProperties( "MOBILEMG42_.*", {MinCampTime=40, MaxCampTime=70} );
	SetMapGoalProperties( "DEFEND_Tank_Barrier_1", {MinCampTime=30, MaxCampTime=60} );
	SetMapGoalProperties( "DEFEND_Tank_Barrier_2", {MinCampTime=30, MaxCampTime=60} );
	SetMapGoalProperties( "DEFEND_Tank_Barrier_hide", {MinCampTime=20, MaxCampTime=40} );

	SetGoalPriority( "ESCORT_tank", 0.82, TEAM.AXIS );
	SetGoalPriority( "BUILD_SdKfz_234", 0.81, TEAM.AXIS );
	SetGoalPriority( "PLANT_Tank_Barrier_1", 0.79, TEAM.AXIS );
	SetGoalPriority( "PLANT_Tank_Barrier_2", 0.79, TEAM.AXIS );
	SetGoalPriority( "BUILD_Axis_Command_Post", 0.91, TEAM.AXIS );
	SetGoalPriority( "PLANT_Tunnel_Door", 0.8, TEAM.AXIS );
	SetGoalPriority( "SMOKEBOMB.*", 0.51, TEAM.AXIS );
	SetGoalPriority( "AIRSTRIKE.*", 0.51, TEAM.AXIS );
	SetGoalPriority( "CALLARTILLERY.*", 0.7, TEAM.ALLIES );
	SetGoalPriority( "MOBILEMG42_palace", 0.7, TEAM.ALLIES );
	SetGoalPriority( "MOBILEMG42_barrier1", 0.51, TEAM.AXIS );
	SetGoalPriority( "PLANTMINE.*", 0.7, TEAM.ALLIES );
	SetGoalPriority( "SNIPE.*", 0.7, TEAM.ALLIES );
	
	SetGoalPriority( "MOUNTMG42_balcony_mg", 0.71, TEAM.ALLIES );


	Util.AddUsePoint( "PLANT_Tank_Barrier_1", { Vec3(-1707,142,24), Vec3(-1697,211,24), Vec3(-1709,305,24), Vec3(-1516,228,24) });
	Util.AddUsePoint( "PLANT_Tank_Barrier_2", { Vec3(2846,1160,-31.6), Vec3(2891,1100,-31.5), Vec3(2978,1054,-32), Vec3(3046,1241,-39.7) });
	Util.AddUsePoint( "PLANT_Tunnel_Door", { Vec3(3886,4884,-87) });
	//Util.AddUsePoint( "PLANT_Tunnel_Door", { Vec3(3886,4884,-87), Vec3(3972,4877,-87) });
	
	//////////////////////////////////////////////////////////////////////
	//Make the first spawn stuff for tank Escorting...

	Util.SetMaxUsersInUse( 1, "ESCORT_tank" );
	Util.SetMaxUsersInProgress( 1, "ESCORT_tank" );
	SetGoalPriority( "ESCORT_tank", 0.0, 0, CLASS.ENGINEER );
	SetGoalPriority( "ESCORT_tank", 0.0, 0, CLASS.MEDIC );
	sleep(10);

	Util.SetMaxUsersInUse( 1, "ESCORT_tank" );
	Util.SetMaxUsersInProgress( 2, "ESCORT_tank" );
	SetGoalPriority( "ESCORT_tank", 0.82, 0, CLASS.ENGINEER );
	SetGoalPriority( "ESCORT_tank", 0.82, 0, CLASS.MEDIC );
	
	Util.MapDebugPrint( "Omni-bot map script for " + GetMapName() + " executed." );
};

global OnBotJoin = function( bot )
{
	bot.TargetBreakableDist = 90.0;
	// Only set MaxViewDistance on maps with limited sight (e.g. fog)
	//~bot.MaxViewDistance = 2400;
	
	bot.IgnoreTarget( GetGoal("MOVER_piano").GetEntity(), 9999 );
};

global InitializeRoutes = function()
{
	MapRoutes =
	{
		BUILD_Tank_Barrier_2 =
		{
			ROUTE_cp =
			{
				ROUTE_city_end = {},
				ROUTE_palace_road1 = {},
				ROUTE_palace_road2 = {},
			},
			ROUTE_cp2 =
			{
				ROUTE_palace_road1 = {},
				ROUTE_palace_road2 = {},
				ROUTE_palace_circle = {},
			},			
			ROUTE_tunnel_gate =
			{
				ROUTE_palace_road1 = {},
				ROUTE_palace_road2 = {},
				ROUTE_palace_circle = {},
			},
		},
		BUILD_Tank_Barrier_1 =
		{
			ROUTE_city_spawn_front =
			{
				ROUTE_orange_front = {},
				ROUTE_orange_road = 
				{ 
					Weight = 2, 
					ROUTE_orange_road_2 = {},
					ROUTE_orange_road_3 = {},
				},
			},
			ROUTE_city_spawn_back =
			{
				ROUTE_orange_side = 
				{
					ROUTE_orange_road_2 = {},
					ROUTE_orange_road_3 = {},
				},
			},
		},
		ATTACK_Tank_Barrier_1 =
		{
			ROUTE_axis_spawn_front =
			{
					ROUTE_axis_front_exit1 = 
					{
						ROUTE_axis_main_road = 
						{
							ROUTE_axis_main_road2 = {},
							ROUTE_axis_bush_walk2 = {},
						},
					},
					ROUTE_axis_front_exit2 = 
					{
						ROUTE_axis_main_road = 
						{
							ROUTE_axis_main_road2 = {},
							ROUTE_axis_bush_walk2 = {},
						},
						ROUTE_axis_bush_walk1 = 
						{
							ROUTE_axis_bush_walk2 = {},
							ROUTE_axis_city_flank = {},
						},
					},
			},
			ROUTE_axis_spawn_back =
			{
					ROUTE_axis_back_exit1 = 
					{
						ROUTE_axis_table = {},
						ROUTE_axis_barrier_hole = { Weight = 3, },
					},
					ROUTE_axis_back_exit2 = 
					{
						Weight = 2,
						ROUTE_axis_table = {},
						ROUTE_axis_barrier_hole = { Weight = 3, },
						ROUTE_axis_main_road = 
						{
							Weight = 2,
							ROUTE_axis_main_road2 = {},
							ROUTE_axis_bush_walk2 = { Weight = 2, },
							ROUTE_axis_city_flank = {},
						},
					},
			},
			
			ROUTE_axis_late_escort =
			{
					ROUTE_axis_barrier_hole = 
					{
						ROUTE_axis_late_barrier = {},
					},
			},
		},
		
		ESCORT_tank =
		{
			ROUTE_axis_spawn_front =
			{
					ROUTE_axis_front_exit1 = 
					{
						ROUTE_axis_main_road = 
						{
							ROUTE_axis_main_road2 = {},
							ROUTE_axis_bush_walk2 = {},
						},
					},
					ROUTE_axis_front_exit2 = 
					{
						ROUTE_axis_main_road = 
						{
							ROUTE_axis_main_road2 = {},
							ROUTE_axis_bush_walk2 = {},
						},
						ROUTE_axis_bush_walk1 = 
						{
							ROUTE_axis_bush_walk2 = {},
							ROUTE_axis_city_flank = {},
						},
					},
			},
			ROUTE_axis_spawn_back =
			{
					ROUTE_axis_back_exit1 = 
					{
						ROUTE_axis_table = {},
						ROUTE_axis_barrier_hole = { Weight = 3, },
					},
					ROUTE_axis_back_exit2 = 
					{
						ROUTE_axis_table = {},
						ROUTE_axis_barrier_hole = { Weight = 3, },
						ROUTE_axis_main_road = 
						{
							Weight = 2,
							ROUTE_axis_main_road2 = {},
							ROUTE_axis_bush_walk2 = { Weight = 2, },
							ROUTE_axis_city_flank = {},
						},
					},
			},
			ROUTE_axis_late_escort =
			{
					ROUTE_axis_barrier_hole = 
					{
						ROUTE_axis_late_barrier = {},
					},
			},
			
			ROUTE_city_spawn_front = 
			{
					ROUTE_hotel_road1 = 
					{ 
						Weight = 3,
						ROUTE_hotel_road1b = {}, 
					},
					ROUTE_hotel_road2 = {},
					ROUTE_hotel_side = {},
			},
			ROUTE_city_spawn_back = 
			{
					ROUTE_hotel_road1 = 
					{ 
						Weight = 2,
						ROUTE_hotel_road1b = {}, 
					},
					ROUTE_hotel_road2 = {},
					ROUTE_hotel_side = {},
					ROUTE_purple_house = {},
			},
		},
		
		CAPPOINT_tank = 
		{
			ROUTE_party_room = 
			{
				ROUTE_out_stairs = { Weight = 2,},
				ROUTE_balcony_3rd = 
				{
					ROUTE_palace_wall = {},
					ROUTE_tunnel_side =
					{
						ROUTE_tunnel_gate = {},
					},
				},
				ROUTE_main_stairs = 
				{
					ROUTE_palace_wall = {},
					ROUTE_tunnel_side =
					{
						ROUTE_tunnel_gate = {},
					},
				},
			},
			ROUTE_chalice = 
			{
				ROUTE_palace_wall = {},
				ROUTE_main_stairs = 
				{
					ROUTE_palace_wall = { Weight = 2,},
					ROUTE_tunnel_side =
					{
						ROUTE_tunnel_gate = {},
					},
				},
			},
			
		},
		
		DEFEND_Objective_1 =
		{
			ROUTE_palace_spawn = 
			{
				ROUTE_2nd_floor_side = {},
				ROUTE_main_stairs = {},
				ROUTE_back_stairs = {},
			},
		},
		BUILD_Tunnel_Door =
		{
		},
		PLANT_Tunnel_Door =
		{
		},
		PLANT_Tank_Barrier_2 =
		{
			ROUTE_city_spawn_front = 
			{
					ROUTE_hotel_road1 = 
					{ 
						Weight = 3,
						ROUTE_hotel_road1b = {}, 
					},
					ROUTE_hotel_road2 = {},
					ROUTE_hotel_side = {},
			},
			ROUTE_city_spawn_back = 
			{
					ROUTE_hotel_road1 = 
					{ 
						Weight = 2,
						ROUTE_hotel_road1b = {}, 
					},
					ROUTE_hotel_road2 = {},
					ROUTE_hotel_side = {},
					ROUTE_purple_house = {},
			},
		},
		FLAG_sword =
		{
			ROUTE_cp = 
			{
				ROUTE_tunnel_door = 
				{
					ROUTE_2nd_floor_side = {},
				},
				ROUTE_tunnel_side = 
				{
					ROUTE_out_stairs = {},
					ROUTE_main_stairs = {},
				},
				ROUTE_tunnel_gate = 
				{
					ROUTE_out_stairs = {},
					ROUTE_palace_wall = {},
					ROUTE_main_stairs = {},
				},
			},
			ROUTE_tunnel_door = 
			{
				ROUTE_2nd_floor_side = {},
			},
		},
		FLAG_chalice =
		{
			ROUTE_cp = 
			{
				ROUTE_tunnel_door = 
				{
					ROUTE_2nd_floor_side = {},
				},
				ROUTE_tunnel_side = 
				{
					ROUTE_main_stairs = {},
				},
				ROUTE_tunnel_gate = 
				{
					ROUTE_palace_wall = {},
					ROUTE_main_stairs = {},
				},
			},
			ROUTE_tunnel_door = 
			{
				ROUTE_2nd_floor_side = {},
			},
		},
		FLAG_crown =
		{
			ROUTE_cp = 
			{
				ROUTE_tunnel_door = 
				{
					ROUTE_2nd_floor_side = {},
				},
				ROUTE_tunnel_side = 
				{
					ROUTE_out_stairs = {},
					ROUTE_main_stairs = {},
				},
				ROUTE_tunnel_gate = 
				{
					ROUTE_out_stairs = {},
					ROUTE_palace_wall = {},
					ROUTE_main_stairs = {},
				},
			},
			ROUTE_tunnel_door = 
			{
				ROUTE_2nd_floor_side = {},
			},
		},
		
	};
	
	
	//copy some routes
	//MapRoutes.DEFEND_Tank_Barrier_1 = MapRoutes.BUILD_Tank_Barrier_1;
	MapRoutes.DEFEND_Tank_Barrier_2 = MapRoutes.BUILD_Tank_Barrier_1;
	MapRoutes.DEFEND_Tank_Barrier_3 = MapRoutes.BUILD_Tank_Barrier_1;
	MapRoutes.DEFEND_Tank_Barrier_4 = MapRoutes.BUILD_Tank_Barrier_1;
	MapRoutes.DEFEND_Tank_Barrier_5 = MapRoutes.BUILD_Tank_Barrier_1;
	MapRoutes.DEFEND_Tank_Barrier_6 = MapRoutes.BUILD_Tank_Barrier_1;
	
	MapRoutes.DEFEND_Tank_Barrier_7 = MapRoutes.ATTACK_Tank_Barrier_1;
	MapRoutes.DEFEND_Tank_Barrier_8 = MapRoutes.ATTACK_Tank_Barrier_1;
	MapRoutes.DEFEND_Tank_Barrier_9 = MapRoutes.ATTACK_Tank_Barrier_1;
	MapRoutes.ATTACK_Tank_Barrier_2 = MapRoutes.ATTACK_Tank_Barrier_1;
	MapRoutes.PLANT_Tank_Barrier_1 = MapRoutes.ATTACK_Tank_Barrier_1;
	MapRoutes.BUILD_SdKfz_234 = MapRoutes.ESCORT_tank;
	
	MapRoutes.DEFEND_Objective_2 = MapRoutes.DEFEND_Objective_1;
	MapRoutes.DEFEND_Objective_3 = MapRoutes.DEFEND_Objective_1;
	MapRoutes.DEFEND_Objective_5 = MapRoutes.DEFEND_Objective_1;
	
	MapRoutes.DEFEND_Tank_Barrier_2_1 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Tank_Barrier_2_2 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Tank_Barrier_2_3 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Tank_Barrier_2_4 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Tank_Barrier_2_5 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Stop_Tank_1 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Stop_Tank_2 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Stop_Tank_3 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Stop_Tank_4 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Stop_Tank_5 = MapRoutes.BUILD_Tank_Barrier_2;
	MapRoutes.DEFEND_Stop_Tank_6 = MapRoutes.BUILD_Tank_Barrier_2;
	
	MapRoutes.DEFEND_Tank_Barrier_2_6 = MapRoutes.PLANT_Tank_Barrier_2;
	MapRoutes.DEFEND_Tank_Barrier_2_7 = MapRoutes.PLANT_Tank_Barrier_2;
	MapRoutes.DEFEND_Tank_Barrier_2_8 = MapRoutes.PLANT_Tank_Barrier_2;
				
	Util.Routes(MapRoutes);
};
