"S9L1.sce"
{
	INT unit_recno 
	INT alencon_recno
	INT la_hire_recno
	INT jean_recno
	INT dlllier_recno

	INT orlean_sell_weapon_list_id 
	INT orlean_weapon_shop_recno 
	INT orlean_sell_potion_list_id
	INT orlean_potion_shop_recno

	INT jargeau_sell_weapon_list_id 
	INT jargeau_weapon_shop_recno 
	INT jargeau_sell_potion_list_id
	INT jargeau_potion_shop_recno	

	INT meung_sell_weapon_list_id 
	INT meung_weapon_shop_recno 
	INT meung_sell_potion_list_id
	INT meung_potion_shop_recno

	INT beaugency_sell_weapon_list_id 
	INT beaugency_weapon_shop_recno 
	INT beaugency_sell_potion_list_id
	INT beaugency_potion_shop_recno

	INT tour_sell_potion_list_id
	INT tour_potion_shop_recno

	INT patay_sell_weapon_list_id
	INT patay_weapon_shop_recno

	INT orlean_barrack_recno
	INT orlean_barrack_recruit_id_a
	INT orlean_barrack_recruit_id_b
	INT orlean_barrack_spawn_recno

	INT jargeau_barrack_recno
	INT jargeau_barrack_recruit_id_a
	INT jargeau_barrack_recruit_id_b
	INT jargeau_barrack_spawn_recno

	INT g_one_barrack_recno
	INT g_one_barrack_recruit_id_a
	INT g_one_barrack_recruit_id_b
	INT g_one_barrack_spawn_recno

	INT meung_barrack_recno
	INT meung_barrack_recruit_id_a
	INT meung_barrack_recruit_id_b
	INT meung_barrack_spawn_recno

	INT beaugency_barrack_recno
	INT beaugency_barrack_recruit_id_a
	INT beaugency_barrack_recruit_id_b
	INT beaugency_barrack_spawn_recno

	init
	{
		if(FUNC("get_scenario_stage") == 0)
		{
//			FUNC("set_game_start_date", 1429, 4, 29, 420, 0, 1440)

			FUNC("set_nation_friendship", "ENGLISH", "FRENCH", -77)
			FUNC("set_nation_friendship", "FRENCH", "ENGLISH", -77)
			FUNC("set_relation_status", "ENGLISH", "FRENCH", 0)

//			unit_recno = FUNC("load_unit", "JOAN_OF_ARC", "FRENCH") 

//			if( unit_recno == 0 )
//			{
//				unit_recno = FUNC("add_unit", "JOAN_OF_ARC", "FRENCH") 
//			}

			// set shop
			orlean_weapon_shop_recno = FUNC("search_facility_by_name" , "OrleanWeaponShop") 
			orlean_sell_weapon_list_id = FUNC("search_item_sell_list_by_code" , "S5L1_weapon") 
			orlean_potion_shop_recno = FUNC("search_facility_by_name" , "OrleanPotionShop") 
			orlean_sell_potion_list_id = FUNC("search_item_sell_list_by_code" , "S5L1_potion") 

			FUNC("shop_set_sell_item_list", orlean_weapon_shop_recno, orlean_sell_weapon_list_id) 
			FUNC("shop_set_sell_item_list", orlean_potion_shop_recno, orlean_sell_potion_list_id) 

			jargeau_weapon_shop_recno = FUNC("search_facility_by_name" , "JargeauWeaponShop") 
			jargeau_sell_weapon_list_id = FUNC("search_item_sell_list_by_code" , "S5L8_weapon") 
			jargeau_potion_shop_recno = FUNC("search_facility_by_name" , "JargeauPotionShop") 
			jargeau_sell_potion_list_id = FUNC("search_item_sell_list_by_code" , "S5L8_potion") 

			FUNC("shop_set_sell_item_list", jargeau_weapon_shop_recno, jargeau_sell_weapon_list_id) 
			FUNC("shop_set_sell_item_list", jargeau_potion_shop_recno, jargeau_sell_potion_list_id) 

			meung_weapon_shop_recno = FUNC("search_facility_by_name" , "MeungWeaponShop") 
			meung_sell_weapon_list_id = FUNC("search_item_sell_list_by_code" , "S5L5_weapon") 
			meung_potion_shop_recno = FUNC("search_facility_by_name" , "MeungPotionShop") 
			meung_sell_potion_list_id = FUNC("search_item_sell_list_by_code" , "S5L5_potion") 

			FUNC("shop_set_sell_item_list", meung_weapon_shop_recno, meung_sell_weapon_list_id) 
			FUNC("shop_set_sell_item_list", meung_potion_shop_recno, meung_sell_potion_list_id) 

			beaugency_weapon_shop_recno = FUNC("search_facility_by_name" , "BeaugencyWeaponShop") 
			beaugency_sell_weapon_list_id = FUNC("search_item_sell_list_by_code" , "S5L4_weapon") 
			beaugency_potion_shop_recno = FUNC("search_facility_by_name" , "BeaugencyPotionShop") 
			beaugency_sell_potion_list_id = FUNC("search_item_sell_list_by_code" , "S5L4_potion") 

			FUNC("shop_set_sell_item_list", beaugency_weapon_shop_recno, beaugency_sell_weapon_list_id) 
			FUNC("shop_set_sell_item_list", beaugency_potion_shop_recno, beaugency_sell_potion_list_id) 

			patay_weapon_shop_recno = FUNC("search_facility_by_name" , "PatayWeaponShop") 
			patay_sell_weapon_list_id = FUNC("search_item_sell_list_by_code" , "S5L3_weapon") 
			tour_potion_shop_recno = FUNC("search_facility_by_name" , "ToursPotionShop") 
			tour_sell_potion_list_id = FUNC("search_item_sell_list_by_code" , "S5L3_potion") 

			FUNC("shop_set_sell_item_list", patay_weapon_shop_recno, patay_sell_weapon_list_id) 
			FUNC("shop_set_sell_item_list", tour_potion_shop_recno, tour_sell_potion_list_id) 


			// --- Barrack --- //
			orlean_barrack_recno = FUNC("search_facility_by_name", "OrleanBarrackRecruit")
			orlean_barrack_recruit_id_a = FUNC("search_recruit_list_by_code", "S5L1_barrack")
			orlean_barrack_recruit_id_b = FUNC("search_recruit_list_by_code", "S5L1_barrack")
			orlean_barrack_spawn_recno = FUNC("search_facility_by_name", "OrleanBarrackSpawn")
			FUNC("barrack_set_recruit_list", orlean_barrack_recno, orlean_barrack_spawn_recno, orlean_barrack_recruit_id_a, orlean_barrack_recruit_id_b ) 

			jargeau_barrack_recno = FUNC("search_facility_by_name", "JargeauBarrackRecruit")
			jargeau_barrack_recruit_id_a = FUNC("search_recruit_list_by_code", "S5L8_barrack")
			jargeau_barrack_recruit_id_b = FUNC("search_recruit_list_by_code", "S5L8_barrack")
			jargeau_barrack_spawn_recno = FUNC("search_facility_by_name", "JargeauBarrackSpawn")
			FUNC("barrack_set_recruit_list", jargeau_barrack_recno, jargeau_barrack_spawn_recno, jargeau_barrack_recruit_id_a, jargeau_barrack_recruit_id_b ) 

			g_one_barrack_recno = FUNC("search_facility_by_name", "G1BarrackRecruit")
			g_one_barrack_recruit_id_a = FUNC("search_recruit_list_by_code", "S5L7_barrack")
			g_one_barrack_recruit_id_b = FUNC("search_recruit_list_by_code", "S5L7_barrack")
			g_one_barrack_spawn_recno = FUNC("search_facility_by_name", "G1BarrackSpawn")
			FUNC("barrack_set_recruit_list", g_one_barrack_recno, g_one_barrack_spawn_recno, g_one_barrack_recruit_id_a, g_one_barrack_recruit_id_b ) 

			meung_barrack_recno = FUNC("search_facility_by_name", "FacilityMeungRecruit")
			meung_barrack_recruit_id_a = FUNC("search_recruit_list_by_code", "S5L5_barrack")
			meung_barrack_recruit_id_b = FUNC("search_recruit_list_by_code", "S5L5_barrack")
			meung_barrack_spawn_recno = FUNC("search_facility_by_name", "FacilityMeungBarrack")
			FUNC("barrack_set_recruit_list", meung_barrack_recno, meung_barrack_spawn_recno, meung_barrack_recruit_id_a, meung_barrack_recruit_id_b ) 

			beaugency_barrack_recno = FUNC("search_facility_by_name", "BeaugencyBarrackRecruit")
			beaugency_barrack_recruit_id_a = FUNC("search_recruit_list_by_code", "S5L4_barrack")
			beaugency_barrack_recruit_id_b = FUNC("search_recruit_list_by_code", "S5L4_barrack")
			beaugency_barrack_spawn_recno = FUNC("search_facility_by_name", "BeaugencyBarrackSpawn")
			FUNC("barrack_set_recruit_list", beaugency_barrack_recno, beaugency_barrack_spawn_recno, beaugency_barrack_recruit_id_a, beaugency_barrack_recruit_id_b ) 
		}

		FUNC("set_fog_distance", 4096) 
		unit_recno = FUNC("search_unit_by_name", "Joanna d'Arc") 

		alencon_recno = FUNC("search_unit_by_code", "Alencon")
		FUNC("set_unit_ranking", alencon_recno, "GENERAL")

		la_hire_recno = FUNC("search_unit_by_code", "LaHire")
		FUNC("set_unit_ranking", alencon_recno, "GENERAL")

		jean_recno = FUNC("search_unit_by_code", "JEAN_DE_METZ")
		FUNC("set_unit_ranking", alencon_recno, "GENERAL")

		FUNC("set_minimap_rotation", 1)
	}

	if( FUNC("is_game_finish") == 0 ) 
	{
		SCRIPT("script\scenario\S9L1_finish.sce")
	}

	if( FUNC("get_scenario_stage") == 1 || FUNC("get_scenario_stage") == 2)
	{
		// run the tactic script for this scenario
		FUNC("set_delay_before_win", 15000)
		SCRIPT("script\scenario\S9L1_tactic.sce")
		exit
	}

	if( FUNC("get_scenario_stage") == 0 )
	{
		FUNC("set_scenario_stage", 1)
	}	
}