############################
####   Tlemcen Events   ####
####      by Garbon     ####
############################

event = {
	id = 51024
	trigger = {
		NOT = { event = 51025
			exists = ALD
		}
		OR = { event = 50024
			event = 50025 }
	}
	random = no
	country = XHO
	name = "Арудж и Хаур аль-Дин Барбаросса"
	desc = "В XVI столетии, Испания занимала различные порты в Северной Африке. Алжир постепенно становится вассалом Испании. Другие порты были захвачены аутрайтами. Мусульмане отчаянно просят помощи у султана Отоманской Порты, а затем и у халифа всего Ислама. Два брата пирата Барбаросса были отправлены султаном  с флотом в Северную Африку. Используя город Тунис, они занимались пиратством и охотой на испанцев в Алжире."
	style = 1
	date = { day = 1 month = november year = 1511 }
	offset = 30
	deathdate = { day = 1 month = january year = 1523 }
	action_a = {
		name = "ACTIONNAME51024A"
        	command = { type = revolt which = 737 }
		command = { type = revolt which = 737 }
		command = { type = revolt which = 738 }
		command = { type = revolt which = 738 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = 736 }
		command = { type = revolt which = 736 }
		command = { type = revolt which = 736 }

command = { type = revolt which = 1674 }
		command = { type = revolt which = 1675 }
command = { type = revolt which = 734 }
command = { type = province_revoltrisk which = 734 value = 800 }
command = { type = province_revoltrisk which = 1674 value = 800 }
		command = { type = province_revoltrisk which = 1675 value = 800 }
command = { type = province_revoltrisk which = 1676 value = 800 }
		command = { type = province_revoltrisk which = 1008 value = 800 }
		command = { type = province_revoltrisk which = 738 value = 800 }
		command = { type = province_revoltrisk which = 737 value = 800 }
		command = { type = province_revoltrisk which = 736 value = 800 }
		command = { type = province_revoltrisk which = 687 value = 800 }
		
		command = { type = revoltrisk which = 100 value = 10 }
		}
	action_b = {
		name = "ACTIONNAME51024B"

                command = { type = revolt which = 737 }
		command = { type = revolt which = 737 }
		command = { type = revolt which = 738 }
		command = { type = revolt which = 738 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = 736 }
		command = { type = revolt which = 736 }
		command = { type = revolt which = 736 }
		
		command = { type = revolt which = -1 }
command = { type = revolt which = 1674 }
		command = { type = revolt which = 1675 }
command = { type = revolt which = 734 }
command = { type = province_revoltrisk which = 734 value = 800 }
command = { type = province_revoltrisk which = 1674 value = 800 }
		command = { type = province_revoltrisk which = 1675 value = 800 }
		command = { type = province_revoltrisk which = 738 value = 800 }
		command = { type = province_revoltrisk which = 737 value = 800 }
		command = { type = province_revoltrisk which = 736 value = 800 }
		command = { type = province_revoltrisk which = 687 value = 800 }
command = { type = province_revoltrisk which = 1676 value = 800 }
		command = { type = province_revoltrisk which = 1008 value = 800 }
		command = { type = inf which = -2 value = 5000 }
		command = { type = inf which = -1 value = 5000 }
		command = { type = cash value = -300 }
		command = { type = revoltrisk which = 100 value = 15 }
		}
	action_c = {
		name = "ACTIONNAME51024C"
		command = { type = country which = ALD }
		command = { type = capital which = 737 }
		command = { type = revoltrisk which = 120 value = 5 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		}
}

event = {
	id = 51025
	trigger = {
		NOT = { event = 51024
			exists = ALD
		}
		OR = { event = 50024
			event = 50025 }
	}
	random = no
	country = XHO
	name = "Арудж и Хаур аль-Дин Барбаросса"
	desc = "В XVI столетии, Испания занимала различные порты в Северной Африке. Алжир постепенно становится вассалом Испании. Другие порты были захвачены аутрайтами. Мусульмане отчаянно просят помощи у султана Тахты, а затем и у халифа всего Ислама. Два брата пирата Барбаросса были отправлены султаном  с флотом в Северную Африку. Используя город Тунис, они занимались пиратством и охотой на испанцев в Алжире."
	style = 1
	date = { day = 2 month = november year = 1511 }
	offset = 30
	deathdate = { day = 1 month = january year = 1523 }
	action_a = {
		name = "ACTIONNAME51024A"
		 command = { type = revolt which = 737 }
		command = { type = revolt which = 737 }
		command = { type = revolt which = 738 }
		command = { type = revolt which = 738 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = 736 }
		command = { type = revolt which = 736 }
		command = { type = revolt which = 736 }
		
		command = { type = revolt which = -1 }
command = { type = revolt which = 1674 }
		command = { type = revolt which = 1675 }
command = { type = revolt which = 734 }
command = { type = province_revoltrisk which = 734 value = 800 }
command = { type = province_revoltrisk which = 1674 value = 800 }
		command = { type = province_revoltrisk which = 1675 value = 800 }
		command = { type = province_revoltrisk which = 738 value = 800 }
		command = { type = province_revoltrisk which = 737 value = 800 }
		command = { type = province_revoltrisk which = 736 value = 800 }
		command = { type = province_revoltrisk which = 687 value = 800 }
command = { type = province_revoltrisk which = 1676 value = 800 }
		command = { type = province_revoltrisk which = 1008 value = 800 }
		}
	action_b = {
		name = "ACTIONNAME51024B"
		 command = { type = revolt which = 737 }
		command = { type = revolt which = 737 }
		command = { type = revolt which = 738 }
		command = { type = revolt which = 738 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = 736 }
		command = { type = revolt which = 736 }
		command = { type = revolt which = 736 }
		
		command = { type = revolt which = -1 }
command = { type = revolt which = 1674 }
		command = { type = revolt which = 1675 }
command = { type = revolt which = 734 }
command = { type = province_revoltrisk which = 734 value = 800 }
command = { type = province_revoltrisk which = 1674 value = 800 }
		command = { type = province_revoltrisk which = 1675 value = 800 }
		command = { type = province_revoltrisk which = 738 value = 800 }
		command = { type = province_revoltrisk which = 737 value = 800 }
		command = { type = province_revoltrisk which = 736 value = 800 }
		command = { type = province_revoltrisk which = 687 value = 800 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = inf which = -2 value = 5000 }
		command = { type = inf which = -1 value = 5000 }
		command = { type = cash value = -150 }
		}
	action_c = {
		name = "ACTIONNAME51024C"
		command = { type = country which = ALD }
		command = { type = capital which = 737 }
		command = { type = revoltrisk which = 120 value = 5 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		command = { type = revolt which = -1 }
		}
}

event = {
	id = 332000
	trigger = { 	
		owned = { province = 737 data = -1 }
		owned = { province = 738 data = -1 }			
		control = { province = 737 data = REB }	
		control = { province = 738 data = REB }	
		OR = {  event = 51024
			event = 51025
		}
	}
	random = no
	country = XHO
	name = "Барбаросса захватывают Алжир"
	desc = "В XVI столетии, Испания занимала различные порты в Северной Африке. Алжир постепенно становится вассалом Испании. Другие порты были захвачены аутрайтами. Мусульмане отчаянно просят помощи у султана Тахты, а затем и у халифа всего Ислама. Два брата пирата Барбаросса были отправлены султаном  с флотом в Северную Африку. Используя город Тунис, как отправную точку своего похода против неверных. Однако их подарки не впечатлили правителя Туниса, который запретил им входить в город. Несмотря на это они продолжали свою пиратскую деятельность и нападения на Алжир. В то же самое время соседние конкурирующие султанаты не раз нападали и разоряли Тлемсене."
	style = 2
	date = { day = 1 month = november year = 1511 }
	offset = 30
	deathdate = { day = 1 month = january year = 1530 }
	action_a = { 
		name = "Какая неприятность!"
		command = { type = independence which = ALD }   
		command = { type = removecore which = 738 } 
		command = { type = removecore which = 737 }   
		command = { type = removecore which = 738 }
		command = { type = removecore which = 1687 }   
		command = { type = removecore which = 1674 }
		command = { type = removecore which = 1675 } 
command = { type = removecore which = 1676 }
		command = { type = removecore which = 1008 } 
		 
	}
}



event = {
	id = 217930
	trigger = { 	
		NOT = { 
			exists = ALD
		}
	}
	random = no
	country = U13
	name = "Барбаросса захватывают Алжир"
	desc = "В XVI столетии, Испания занимала различные порты в Северной Африке. Алжир постепенно становится вассалом Испании. Другие порты были захвачены аутрайтами. Мусульмане отчаянно просят помощи у султана Тахты, а затем и у халифа всего Ислама. Два брата пирата Барбаросса были отправлены султаном  с флотом в Северную Африку. Используя город Тунис, как отправную точку своего похода против неверных. Однако их подарки не впечатлили правителя Туниса, который запретил им входить в город. Несмотря на это они продолжали свою пиратскую деятельность и нападения на Алжир. В то же самое время соседние конкурирующие султанаты не раз нападали и разоряли Тлемсене."
	style = 2
	date = { day = 1 month = november year = 1511 }
	offset = 30
	deathdate = { day = 1 month = january year = 1700 }
	action_a = { 
		name = "Какая неприятность!"
		command = { type = independence which = ALD }   
		command = { type = removecore which = 738 } 
		command = { type = removecore which = 737 }   
		command = { type = removecore which = 738 }
		command = { type = removecore which = 1687 }   
		command = { type = removecore which = 1674 }
		command = { type = removecore which = 1675 } 
command = { type = removecore which = 1676 }
		command = { type = removecore which = 1008 } 
		 
	}
}