###########################
####    Tunis Events   ####
####     by Garbon     ####
###########################

event = {
	id = 51026
	random = no
	country = TUN
	name = "EVENTNAME51026"
	desc = "EVENTHIST51026"
	style = 1
	date = { day = 1 month = january year = 1435 }
	offset = 20
	action_a = {
		name = "ACTIONNAME51026A"
		command = { type = diplomats value = 2 }
		command = { type = inflation value = -5 }
		command = { type = infra value = 50 }
		command = { type = vassal which = XHO }
		command = { type = dynastic which = MOR }
		command = { type = relation which = XHO value = 50 }
		command = { type = relation which = MOR value = 75 }
		}
}

event = {
	id = 51027
	random = no
	country = TUN
	name = "EVENTNAME51027"
	desc = "EVENTHIST51027"
	style = 1
	date = { day = 1 month = january year = 1488 }
	offset = 20
	action_a = {
		name = "ACTIONNAME51027A"
		command = { type = diplomats value = -2 }
		command = { type = infra value = -150 }
		command = { type = breakvassal which = XHO }
		command = { type = independence which = TRI }
		command = { type = relation which = XHO value = -25 }
		command = { type = relation which = MOR value = -50 }
		command = { type = stability value = -2 }

command = { type = secedeprovince which = XHO value = 1008 }
		command = { type = secedeprovince which = XHO value = 1676 }

		command = { type = secedeprovince which = XHO value = 738 }
		command = { type = secedeprovince which = XHO value = 735 }
		command = { type = secedeprovince which = XHO value = 736 }
		command = { type = secedeprovince which = XHO value = 737 }
                command = { type = secedeprovince which = XHO value = 1687 }
                command = { type = secedeprovince which = MOR value = 733 }
                command = { type = secedeprovince which = MOR value = 1734 }
		command = { type = secedeprovince which = MAM value = 741 }
		command = { type = secedeprovince which = MAM value = 742 }
		command = { type = trigger which = 51028 }
		}
	action_b = {
		name = "ACTIONNAME51027B"
		command = { type = breakvassal which = XHO }
		command = { type = relation which = XHO value = -100 }
		command = { type = relation which = MOR value = -100 }
		command = { type = stability value = -4 }
        	command = { type = revolt which = 738 }
		command = { type = revolt which = 738 }
        	command = { type = revolt which = 740 }
		command = { type = revolt which = 740 }
command = { type = revolt which = 1614 }
command = { type = revolt which = 1614 }
		}
}

event = {
	id = 51023
	random = no
	country = TUN
	name = "EVENTNAME51023"
	desc = "EVENTHIST51023"
	style = 1
	action_a = {
		name = "ACTIONNAME51023A"
		command = { type = sleepevent which = 51025 }
		command = { type = cash value = 75 }
		}
	action_b = {
		name = "ACTIONNAME51023B"
		command = { type = sleepevent which = 51024 }
		}
}



#EEP Garbon
event = {
	id = 300000
	trigger = { 
		event = 301000 
		exists = SPA
		NOT = {
                	exists = GRA
                }
	}
	random = no
	country = TUN
	name = "The Moriscos Request Aid"
	desc = "Prior to its fall, the Muslim kingdom of Granada routinely asked its Muslim brothers for support.  After its fall, many Moriscos still held out hope that the Ottoman Empire would liberate them.  However, surely, the Moriscos would not have become agitated had the sultan of Tunis came to their aid." 
	style = 1
	date = { day = 1 month = january year = 1492 }
	deathdate = { day = 30 month = december year = 1550 }
	offset = 1800
	action_a = {
		name = "We have other concerns"
		command = { type = merchants value = 1 }
		command = { type = diplomats value = 1 }
	}
	action_b = {
		name = "We must help them!"
		command = { type = cav which = -1 value = 5000 }
		command = { type = galleys which = -1 value = 8 }
		command = { type = stability value = -2 }
		command = { type = casusbelli which = SPA value = 24 } 
		command = { type = addcore which = 444 } 
		command = { type = manpower value = 5 }
	}
}

event = {
	id = 300001
	trigger = {
		exists = SPA
		NOT = { vassal = { country = SPA country = TUN } }
		NOT = { countrysize = 5 }
		NOT = { vassal = { country = TUR country = TUN } }
		NOT = { vassal = { country = MAM country = TUN } }
	}
	random = no
	country = TUN
	name = "Tunis and Carlos I"
	desc = "In 1534, Khayr al-Din Barbarossa initiated the first Ottoman conquest of Tunis. However, Spanish forces in the area drove off his assault. They then established a garrison in the port.  Without no discourse, Al-Hasan, the Hafsid ruler of Tunis, fled under the cloak of Carlos I. With little work, Carlos may establish Tunis as a vassal of Spain."
	style = 1

	date = { day = 1 month = january year = 1534 }
	offset = 30
	date = { day = 1 month = january year = 1535 }

	action_a = {
		name = "OK"
		command = { type = trigger which = 85059 } #SPA
	}
}

event = {
	id = 51029
	trigger = {
		NOT = { event = 51030
			exists = ALD
		}
		OR = { event = 50024
			event = 50025 }
	}
	random = no
	country = TUN
	name = "EVENTNAME51024"
	desc = "EVENTHIST51024"
	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 = 1674 }
		command = { type = revolt which = 1675 }
		command = { type = revolt which = 1687 }
                command = { type = revolt which = 1674 }
		command = { type = revolt which = 1675 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = -1 }
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 = 1687 value = 800 }
		command = { type = province_revoltrisk which = 1674 value = 800 }
                command = { type = province_revoltrisk which = 1675 value = 800 }
		}
	action_b = {
		name = "ACTIONNAME51024B"
                command = { type = treasury value = -1000 }
		command = { type = domestic which = CENTRALIZATION value = -8 }
                command = { type = domestic which = INNOVATIVE value = -2 }
		}
}

event = {
	id = 51030
	trigger = {
		NOT = { event = 51029
			exists = ALD
		}
		OR = { event = 50024
			event = 50025 }
	}
	random = no
	country = TUN
	name = "EVENTNAME51024"
	desc = "EVENTHIST51025"
	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 = 1674 }
		command = { type = revolt which = 1675 }
		command = { type = revolt which = 1687 }
                command = { type = revolt which = 1674 }
		command = { type = revolt which = 1675 }
		command = { type = revolt which = 1687 }
		command = { type = revolt which = -1 }
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 = 1687 value = 800 }
		command = { type = province_revoltrisk which = 1674 value = 800 }
                command = { type = province_revoltrisk which = 1675 value = 800 }
		}
	action_b = {
		name = "ACTIONNAME51024B"
                command = { type = treasury value = -1000 }
		command = { type = domestic which = CENTRALIZATION value = -8 }
                command = { type = domestic which = INNOVATIVE value = -2 }
		}
}

event = {
	id = 51031
	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 = TUN
	name = "The Barbarossas take Algiers"
	desc = "EVENTHIST51025"
	style = 2
	date = { day = 1 month = november year = 1511 }
	offset = 30
	deathdate = { day = 1 month = january year = 1530 }
	action_a = { 
		name = "How horrid!"
		command = { type = independence which = ALD } 
	}
}



